Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scss files in the assets folder are treated as css when optimizer is enabled #21617

Closed
2 tasks done
kemsky opened this issue Aug 20, 2021 · 4 comments
Closed
2 tasks done

Comments

@kemsky
Copy link

kemsky commented Aug 20, 2021

🐞 Bug report

Command (mark with an x)

  • build
  • serve

Is this a regression?

Yes, version 11 does not have this problem.

Description

Previously it was ok to have scss files in the assets folder, but since version 12 it leads to errors during optimization because cli treats sccs files as css for some reason.

🔬 Minimal Reproduction

Just put any non-empty (e.g. define var) scss file into assets folder and do production build or serve with optimization enabled.

🌍 Your Environment


Angular CLI: 12.2.0
Node: 14.17.0
Package Manager: yarn 1.22.5
OS: win32 x64

Angular: 12.2.0
... animations, cdk, cli, common, compiler, compiler-cli, core
... elements, forms, language-service, material
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1202.0
@angular-devkit/build-angular   12.2.0
@angular-devkit/core            12.2.0
@angular-devkit/schematics      12.2.0
@schematics/angular             12.2.0
rxjs                            6.6.7
typescript                      4.2.4

Anything else relevant?

@alan-agius4
Copy link
Collaborator

What’s the reason of having scss files that are copied uncompiled to the dist folder in the first place?

Note: this has be fixed in version 13 which is currently in prerelease via #21535

@kemsky
Copy link
Author

kemsky commented Aug 20, 2021

@alan-agius4, it was probably a mistake, but we spend a lot of time trying to figure out what exactly is wrong.

@alan-agius4
Copy link
Collaborator

Seeing that this will address in version 13, I am going to close this issue.

Unfortunately, there is no easy way to back port the fix to version 12.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants