-
Notifications
You must be signed in to change notification settings - Fork 12k
Big bundle size increase since 1.6.4 due to unused module bundling #9249
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
Can you provide the output of |
As requested here is the
I tried to delete |
Can you try deleting |
I have the same problem after upgrade from 1.6.3 to 1.6.5 |
1.6.3Using the 1.6.3 and 1.6.4 after deleting yarn.lock and npm-lock lead to #9283 so I can't project@0.0.0 /Users/bhole/Dev/project So I installed the angular 1.6.5 since it was released, to see if the bundle size improved. 1.6.5versions
That on a fresh install via FYI Package size using 1.6.5
|
Closing as major internal improvements have been made to the bundling and optimization pipelines since 1.6.5. If problems still persist with the latest version of the CLI, please consider opening a new issue with details of the versions and environment used. |
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. |
Versions
Repro steps
Observed behavior
The bundle size almost double by upgrading from 1.6.3 to 1.6.4.
With CLI 1.6.3
Here is the bundle size using 1.6.3:
You can see the primeNG modules at the bottom right, a very small box, in the brown area. Only two used modules are imported:
MessagesModule
andMessageModule
.PrimeNG modules used in our lazy loaded feature module are all correctly used and imported (purple area), no unused module is imported.
using 1.6.4
And after an upgrade to 1.6.4 (just changed the CLI version in package.json, nothing was changed in the app code):
As you can see for any mysterious reason, the primeNG modules were ALL imported in the MAIN bundle. They are not imported in our lazy loaded module anymore. And you can note, compared to previous screenshot, that unused (nor imported anywhere in our app code) modules were bundled (
calendar.js
,tree.js
,datatable.js
for example). It causes on our app a big increase in size.It seems the tree shaking or module resolution is broken.
Please also note :
main.ts + x modules
information.Desired behavior
The tree shaking should behave in the same way as before, not increasing our bundle size by importing unused modules.
The text was updated successfully, but these errors were encountered: