Saturday, 29 August 2020

Angular 9 - Always add an "/" in front of the styles.css path in index.html after building --prod

I am looking for a way to tell angular it should always put a slash in front of the path for the styles in the index.html when building in production. I need that to fix a bug from a package which wont work otherwise. So currently I am fixing it manually at the moment like this

...
  <base href="/">
  <link rel="stylesheet" href="styles.67b074ecf30df99829ee.css">
</head>
...
  <base href="/">
  <link rel="stylesheet" href="/styles.67b074ecf30df99829ee.css">
</head>

How can I do this automatically when building for production ?



from Angular 9 - Always add an "/" in front of the styles.css path in index.html after building --prod

No comments:

Post a Comment