Unable to locate stylesheet when building my project after Angular 17 migration #103106
-
Select Topic AreaBug BodyHello, I have an Angular project in version 16 that I've just migrated to version 17. I'm using the Verona template in version 17. My problem is during the build, in fact I have 2 warnings coming from the Verona file : assets/layout files
these errors appeared during migration to Angular 17... I was able to remove the warnings by using the webpack builder proposed on Angular 16 which is @angular-devkit/build-angular:browser and not the one used (recommended) on Angular 17: @angular-devkit/build-angular:application. I checked the Angular configuration files, but I couldn't find a solution. Do you have any idea where this problem might be coming from? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
This comment was marked as off-topic.
This comment was marked as off-topic.
-
Hello, I found an alternative. I encountered this issue when building my project. To be precise, these two CSS imports are in the index.html file. So, I decided to import these CSS files dynamically within the AppComponent. I created a method that allows loading styles dynamically which I call in the ngOnInit of the AppComponent with the css file path. This issue appears because, es-builder can't to solve relative path. |
Beta Was this translation helpful? Give feedback.
-
Hello, ... |
Beta Was this translation helpful? Give feedback.
Hello,
I found an alternative. I encountered this issue when building my project. To be precise, these two CSS imports are in the index.html file. So, I decided to import these CSS files dynamically within the AppComponent. I created a method that allows loading styles dynamically which I call in the ngOnInit of the AppComponent with the css file path.
This issue appears because, es-builder can't to solve relative path.