components: Angular 12 migration does NOT refactor @import to @use AND @use still has at-rule unknown
Bug Report
Affected Package
Is this a regression?
No, @use never worked.
Description
After updating to Angular 12 and reading the blog post @use was a long awaited feature, I was really looking forward to. I was reading about it recently while diving into sass. I updated and migrated to Angular 12 and my app.theme.scss file was NOT migrated. I checked in my package.json, I could not find node-sass, and the only scss loader I was using, was in the core Angular package.
Minimal Reproduction
Update to Angular 12 using ng update, migrating from 11.
I am not sure how to reproduce this on stackblitz, I can’t use the command-line.
If StackBlitz is not suitable for reproduction of your issue, please create a minimal GitHub repository with the reproduction of the issue.
A good way to make a minimal reproduction is to create a new app via ng new repro-app
and add the minimum possible code to show the problem.
Share the link to the repo below along with step-by-step instructions to reproduce the problem, as well as expected and actual behavior.
Issues that don’t have enough info and can’t be reproduced will be closed.
You can read more about issue submission guidelines here: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#submit-issue –>
Exception or Error
Your Environment
Angular Version:
Angular CLI: 12.0.0
Node: 14.16.1
Package Manager: npm 7.12.0
OS: darwin x64
Angular: 12.0.0
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, material, platform-browser, platform-browser-dynamic
... router, service-worker
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1200.0
@angular-devkit/build-angular 12.0.0
@angular-devkit/core 12.0.0
@angular-devkit/schematics 12.0.0
@angular/fire 6.1.0-rc.2
@schematics/angular 12.0.0
rxjs 6.6.7
typescript 4.2.4
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 4
- Comments: 19 (3 by maintainers)
@leylita Yes.
@forward
and@use
should be at the beginning of the file.The following block can be probably placed independently by the internal order logic of styles.
Hi!
I have the same problem with my angular project. I did the migration of Angular 11 to Angular 12 (“@angular/material”: “12.0.3”) Since that I can’t build anymore my app.
My error is that :
My configuration is :
I installed the sass npm package
npm install -g sass
My styles.scss is like this :
And my angular.json is like this :
I followed this guideline angular material
Please can you tell me what am i missing?
Thank you.