-
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
ESBuild SCSS style budget assessments change drastically if source maps are enabled #26676
Comments
Component stylesheets use inline source maps due to the stylesheets being embedded inside the component's code. Source maps include all the original code plus mappings for each alteration. Inline source maps are also base64 encoded which typically adds 33% to the size. |
Thank you for the response @clydin. You make a good point, and to be truthful I had forgotten until your reply that the However, given that the component budget calculation doesn't change even with style source-maps enabled in the old browser, is it expected that it would be with the esbuild-based one? Given your argument, it may well be that it's "a good idea" to count them in the budget because they still count to the network payload for the user, but it may be worth noting that it's an intended change in the documentation. |
…ponent styles This commits, changed the behaviour by emitting component sourcemaps in external files instead of inlining them. Closes angular#24049 and closes angular#26676
…ponent styles This commits, changes the behaviour in the esbuild based builders by emitting component sourcemaps in external files instead of inlining them. Closes angular#24049 and closes angular#26676
…ponent styles This commits, changes the behaviour in the esbuild based builders by emitting component sourcemaps in external files instead of inlining them. Closes angular#24049 and closes angular#26676
…ponent styles This commits, changes the behaviour in the esbuild based builders by emitting component sourcemaps in external files instead of inlining them. Closes angular#24049 and closes angular#26676
…ponent styles This commits, changes the behaviour in the esbuild based builders by emitting component sourcemaps in external files instead of inlining them. Closes angular#24049 and closes angular#26676
…ponent styles This commits, changes the behaviour in the esbuild based builders by emitting component sourcemaps in external files instead of inlining them. Closes angular#24049 and closes angular#26676
…ponent styles This commits, changes the behaviour in the esbuild based builders by emitting component sourcemaps in external files instead of inlining them. Closes angular#24049 and closes angular#26676
…ponent styles This commits, changes the behaviour in the esbuild based builders by emitting component sourcemaps in external files instead of inlining them. Closes angular#24049 and closes angular#26676
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. |
Command
build
Is this a regression?
The previous version in which this bug was not present was
No response
Description
When using either of the new esbuild-based builders (
application
andbrowser-esbuild
), if SCSS stylesheets and source maps are both used, the calculation of the style file sizes for budget verification results in drastically increased reported sizes.Minimal Reproduction
ng new
, using SCSS as the stylesheet formatapp.component.scss
ng build
- the build fails because theapp.component.scss
style file exceeds budget; this is expected, but the key note is that the listed size of the style file is 20.17 kBangular.json
, add"sourceMap": true,
ng build
again - the build again fails due to budget breaches, but the listed size of the style file in question is now 77.26 kBException or Error
Your Environment
Anything else relevant?
This is based on the second point of #26523, which was closed due to a lack of reproduction, but it appears the scope of the issue is broader than that described in the original post; even without any
@use
commands present in the style file, I was able to reproduce the size discrepancy.The text was updated successfully, but these errors were encountered: