-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Updating Material from 11 to 12 removes the theme in the styles.scss but forgets to add it back to the angular.json #22697
Comments
…migration Currently the theming API migration drops any imports starting with `~@angular/material/`, assuming that they're Sass APIs. This can result in prebuilt style imports being removed by mistake. These changes add a regex based on which we'll exclude some imports from the migration. Fixes angular#22697.
Thank you for the report, it looks like the migration is a bit too aggressive. I've submitted #22698 to resolve it, but you should also be able to re-add the import manually yourself. |
Thanks for the PR.
yeah, that's what I did first ... before to figure out it should be in the angular.json instead. |
Ah, this is one of the issues that I ran into last night as well. Thank you for the quick fix @crisbeto. |
…migration Currently the theming API migration drops any imports starting with `~@angular/material/`, assuming that they're Sass APIs. This can result in prebuilt style imports being removed by mistake. These changes add a regex based on which we'll exclude some imports from the migration. Fixes #22697.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🐞 Bug report
Command (mark with an
x
)Is this a regression?
I have not seen this bug during previous migrations
Description
During the update of Material from 11 to 12, the link to the theme has been automatically removed from the
style.scss
file (akathis line has been removed : @import "~@angular/material/prebuilt-themes/indigo-pink.css")
But it has not been automatically added back to the
styles
array of theangular.json
.🔬 Minimal Reproduction
(sorry I don't know the command line for each step, specially the first one that needs to create a project in version 11)
style.scss
(@import "~@angular/material/prebuilt-themes/indigo-pink.css")ng update @angular/material
You will see the line has been removed from the
styles.scss
file ... but no add to styles arry of theangular.json
file.🔥 Exception or Error
🌍 Your Environment
Anything else relevant?
The text was updated successfully, but these errors were encountered: