Fails compilation in scss files
See original GitHub issueDescribe the Bug
I am using @angular-builders/custom-webpack to extend the compilation of the scss
files in order to use postcss and the plugin postcss-modules
Currently, when I try to serve the project these errors are displayed in the terminal:
I think the issue is the component.scss
files are being compiled twice, one for the default compiler and the other one by my custom webpack config: extra-webpack.config.js
.
Minimal Reproduction
Here is my project: https://github.com/gquinteros93/angular-css-modules
Expected Behavior
I expect my scss
files will be compiled with my custom webpack rule.
Environment
Libs
- @angular/core version: 8.2.0
- @angular-devkit/build-angular version: 0.803.24
- @angular-builders/custom-webpack": "8.2.0"
- @angular-builders/dev-server": "7.3.1"
For Tooling issues:
- Node version: v10.9.0
- Platform: Mac
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Failed compiling sass file - css - Stack Overflow
I have an error when I try to compile ...
Read more >SCSS compiling with webpack failed
I'm using Webpack in order to build all my stylesheet files. Actual behavior. Build fails with this error : enter image description here....
Read more >Sass compiles CSS from SASS or SCSS files
Description: Converts SCSS or Sass files to CSS. Common Options: -I, --load-path PATH ... --stop-on-error If a file fails to compile, exit immediately....
Read more >Install Sass
When you install Sass on the command line, you'll be able to run the sass executable to compile .sass and .scss files to...
Read more >SCSS Compiler - phpBB Services
The compiler reads the .scss files and usually generates one .css file which ... If the file fails to compile, it should generate...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @just-jeb , thanks for you help, I follow the same approach as: https://github.com/angular/angular-cli/issues/8427#issuecomment-576263052
And I was able to extend postcss 🎉 :
extra-webpack.config.js
:Now I need to extend posthtml-loader in order to use posthtml-css-modules to replace the classes names by their corresponding hashed names.
I will research if it possible but If you already know or have an idea about how to do it, it’s more than welcome.
Thanks!!!
@gquinteros93
Yeah sorry I mislead you. You need to use
@angular-builders/custom-webpack:dev-server
. In any case@angular-builders/dev-server
is deprecated.