-
Notifications
You must be signed in to change notification settings - Fork 12k
Build size grows rom 6+MB to over 48MB when upgrading from Angular CLI 1.7.4 to 6.0.8 #11431
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
Comments
Here's the file list of my build directory, even the styles.js is over 2MB. The other image is how the contents of the styles.js looks like (just a snippet) - it looks like it's not minified at all? When I inspect the files with webpack-bundle-analyzer, on the main.js it says "Stat size 5.13MB, Parsed size 5.63MB, Gzipped size 641.9KB". Should the file be zipped automatically? I'm having the parsed size in the final file. |
In 6.0+,
|
@clydin Ah, these are totally missing from the file. (the file is a result of the conversion from 1.7.4 with ng update). My configuration file seems to be filled with references to the "prod"-word - should I change all of them into "production"? Even lines like:
Should I change all the prod-words to "production"? Here's angular.json in full:
|
Changing them all to Do you happen to have a copy of the original |
Thanks! Here's the file before upgrade:
|
Thank you for your help, now it builds and the build size is about1MB smaller than with the previous version! I heard the Ivy will reduce sizes even further. So cool. |
No problem. I'm glad it is working now. I added a fix that will ensure a production configuration is always present in upgraded projects; should be in the next release (6.1). |
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 or Feature Request (mark with an
x
)Area
Versions
Angular CLI: 6.0.8
Node: 9.4.0
OS: win32 x64
Angular: 6.0.7
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic
... platform-server, router
@angular-devkit/architect 0.6.8
@angular-devkit/build-angular 0.6.8
@angular-devkit/build-optimizer 0.4.9
@angular-devkit/core 0.6.8
@angular-devkit/schematics 0.6.8
@angular/cdk 6.3.2
@angular/cli 6.0.8
@angular/material 6.3.2
@ngtools/webpack 6.0.8
@schematics/angular 0.6.8
@schematics/update 0.6.8
rxjs 6.2.1
typescript 2.7.2
webpack 4.8.3
Windows 10, npm version 6.1.0
Repro steps
The log given by the failure
Desired functionality
Mention any other details that might be useful
The build size with --prod used to be 6MB+, but with Angular CLI 6.0.8 (and Angular 6), the build size grew to over 48MB.
How should can I help to diagnose this, what could cause this?
The text was updated successfully, but these errors were encountered: