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

source maps should not be included in initial budgets #11999

Closed
StephenFluin opened this issue Aug 24, 2018 · 2 comments · Fixed by #12012
Closed

source maps should not be included in initial budgets #11999

StephenFluin opened this issue Aug 24, 2018 · 2 comments · Fixed by #12012
Assignees
Labels
Milestone

Comments

@StephenFluin
Copy link
Contributor

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Command (mark with an x)

- [x] build

Versions

Angular CLI: 6.2.0-rc.0
Node: 9.2.0
OS: linux x64
Angular: 6.1.4
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package Version

@angular-devkit/architect 0.8.0-rc.0
@angular-devkit/build-angular 0.8.0-rc.0
@angular-devkit/build-optimizer 0.8.0-rc.0
@angular-devkit/build-webpack 0.8.0-rc.0
@angular-devkit/core 0.8.0-rc.0
@angular-devkit/schematics 0.8.0-rc.0
@angular/cdk 6.4.6
@angular/cli 6.2.0-rc.0
@angular/material 6.4.6
@ngtools/webpack 6.2.0-rc.0
@schematics/angular 0.8.0-rc.0
@schematics/update 0.8.0-rc.0
rxjs 6.2.2
typescript 2.7.2
webpack 4.17.1

Repro steps

ng new my-app
yarn add @angular/cli@next @angular-devkit/build-angular@next
add budget to angular.json:

               {
                  "type": "initial",
                  "maximumWarning": "200kb",
                  "maximumError": "500kb"
                }

increase bundle size to warning level 400kb by adding material and polyfills
ng build --prod --source-map=true

The log given by the failure

$ ng build --prod --source-map=true
 92% after chunk asset optimization SourceMapDevToolPlugin runtime.06daa30a2963fa413676.js generate Sourc 92% after chunk asset optimization SourceMapDevToolPlugin main.1ba4d9420e44e4ba5c29.js generate SourceMa 92% after chunk asset optimization SourceMapDevToolPlugin polyfills.4e368c32ecca0224e378.js generate Sou 92% after chunk asset optimization SourceMapDevToolPlugin styles.02b6018b0906cde5eb2a.css generate Sourc 92% after chunk asset optimization SourceMapDevToolPlugin styles.a00195f40656efc2be54.js generate Source 92% after chunk asset optimization SourceMapDevToolPlugin runtime.06daa30a2963fa413676.js attach SourceM 92% after chunk asset optimization SourceMapDevToolPlugin polyfills.4e368c32ecca0224e378.js attach Sourc 92% after chunk asset optimization SourceMapDevToolPlugin styles.02b6018b0906cde5eb2a.css attach SourceM 92% after chunk asset optimization SourceMapDevToolPlugin styles.a00195f40656efc2be54.js attach SourceMa                                                          
Date: 2018-08-24T17:45:50.308Z
Hash: 02cf7346246f12f19bc6
Time: 26814ms
chunk {0} runtime.06daa30a2963fa413676.js, runtime.06daa30a2963fa413676.js.map (runtime) 1.5 kB [entry] [rendered]
chunk {1} main.1ba4d9420e44e4ba5c29.js, main.1ba4d9420e44e4ba5c29.js.map (main) 249 kB [initial] [rendered]
chunk {2} polyfills.4e368c32ecca0224e378.js, polyfills.4e368c32ecca0224e378.js.map (polyfills) 147 kB [initial] [rendered]
chunk {3} styles.02b6018b0906cde5eb2a.css, styles.02b6018b0906cde5eb2a.css.map (styles) 56.2 kB [initial] [rendered]

WARNING in budgets, maximum exceeded for initial. Budget 200 kB was exceeded by 2.71 MB.

ERROR in budgets, maximum exceeded for initial. Budget 500 kB was exceeded by 2.41 MB.

Desired functionality

Source maps should not be included in initial bundle size calculation

@ngbot ngbot bot added this to the needsTriage milestone Aug 24, 2018
@alan-agius4 alan-agius4 added effort1: easy (hours) severity3: broken freq1: low Only reported by a handful of users who observe it rarely labels Aug 24, 2018
@alan-agius4 alan-agius4 self-assigned this Aug 27, 2018
vikerman pushed a commit that referenced this issue Aug 28, 2018
#12012)

* fix(@angular-devkit/build-angular): exclude `.map` files from budget calculations

Closes #11999
vikerman pushed a commit that referenced this issue Aug 29, 2018
#12012)

* fix(@angular-devkit/build-angular): exclude `.map` files from budget calculations

Closes #11999
@Tonio31
Copy link

Tonio31 commented Mar 11, 2019

Hello,

I have exactly the same issue but for type: "bundle".

Should this fix also be applied to bundle calculation ?

@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 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants