You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser after Angular 12 update

I have investigated this issue since I lately migrated a medium-size project from v11 to v12.

The issue is that you have your .scss files in the assets folder which is basically meant to be for assets to be copied as-is. Not to be processed by some kind of scss preprocessor.

Source https://angular.io/guide/workspace-config#asset-config

… folders you want to copy as-is when building your project.

However, files in the assets folder are being minifed and that’s where the exception comes from. During the previous version, these files were probably preprocessed and that is the reason why this issue hasn’t came up until now.

The solution is moving your global .scss files out of the assets folder. You can additionally list them in angular.json (styles property) if needed.

Leave a Comment