You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've recognized that the bundle sizes displayed by the production build do not match the actual file sizes. This is quite misleading when trying to figure out how to optimize these sizes, while it may not be required at all.
On a new generated project - without further modifications - I've executed ng build --prod, which displayed this information:
Generate a new project, e.g. using ng new angular-cli-test-project.
Move to that directory.
Use ng build --prod to create a production build.
Compare the displayed file sizes from the build with the real ones, e.g. using ls | xargs du -h in the dist directory.
Recognize that these do not match - they might differ quite drastically.
The log given by the failure.
No specific log, just the stuff mentioned in the description above.
Desired functionality.
The bundle sizes displayed by the production build should at least approximately match the real file sizes.
Mention any other details that might be useful.
I'm currently investigating if it makes sense to switch from my own template to angular-cli as a base for new projects. An error like this does not occur when building this template project, although it performs an (almost?) equivalent set of build steps and optimizations.
The text was updated successfully, but these errors were encountered:
Bug Report or Feature Request (mark with an
x
)I've recognized that the bundle sizes displayed by the production build do not match the actual file sizes. This is quite misleading when trying to figure out how to optimize these sizes, while it may not be required at all.
On a new generated project - without further modifications - I've executed
ng build --prod
, which displayed this information:Doing a
ls | xargs du -h
in the dist directory afterwards resulted in (shortened):Which shows a drastically difference - e.g. for the vendor bundle, we're talking about a difference of 629 kB.
Versions.
OS: Ubuntu 16.04.
Repro steps.
ng new angular-cli-test-project
.ng build --prod
to create a production build.ls | xargs du -h
in the dist directory.The log given by the failure.
No specific log, just the stuff mentioned in the description above.
Desired functionality.
The bundle sizes displayed by the production build should at least approximately match the real file sizes.
Mention any other details that might be useful.
I'm currently investigating if it makes sense to switch from my own template to angular-cli as a base for new projects. An error like this does not occur when building this template project, although it performs an (almost?) equivalent set of build steps and optimizations.
The text was updated successfully, but these errors were encountered: