-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Duplicate style rules from lib styles after upgrading to Angular 13 #22693
Comments
While I haven’t tried locally yet I noticed that the indigo theme is being referenced twice. |
Hi @alan-agius4. You have definitely got a point. Nevertheless, this still sounds as a regression, since with the v12 toolchain the duplication did not occur. Same code, different toolchain, different results. |
@ibanjo, yeah this seems like an issue with esbuild. Let's continue tracking this evanw/esbuild#2016. |
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. |
Which @angular/* package(s) are the source of the bug?
compiler, upgrade
Is this a regression?
Yes
Description
We are running an Angular application leveraging third-party stylesheet provided by our company. As in most common angular applications, we have a global stylesheet in which we import the aforementioned dependencies.
After upgrading to Angular v13 and its toolchain, we noticed an unexpected increase in the production mode bundle size. Inspecting the build stats, we found out that such increase was concentrated in the main
styles.css
file. With a deeper inspection in the minified file, we found out that many of the global imports were duplicated in the output stylesheet.For us, this is a regression, since before the upgrade this duplication did not occur.
The link below brings to a Github repository where we demonstrate the issue with a simple
@angular/material
import. The branches are organized as follows:master
-> Angular 12, works as expectedfeature/angular-13
-> Angular 13, duplicate entries in built style.cssWe can also provide the unminified versions of the built styles.css bundles (v12 and v13, ready to be compared). Built from the same sources, the v13 indeed does have duplicate rules, while the v12 does not.
Please provide a link to a minimal reproduction of the bug
https://github.com/ibanjo/angular13-duplicate-styles-issue
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run
ng version
)Anything else?
No response
The text was updated successfully, but these errors were encountered: