No vendor chunk when Wiki says vendor chunk is true by default - CLI 1.5.3
See original GitHub issueVersions
Angular CLI: 1.5.3
Node: 8.4.0
OS: win32 x64
Angular: 5.0.2
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router
@angular/cli: 1.5.3
@angular-devkit/build-optimizer: 0.0.33
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.36
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.3
@schematics/angular: 0.1.5
typescript: 2.6.1
webpack: 3.8.1
Repro steps
ng build --prod
Hash: 6089f98c9d995de864aa
Time: 176725ms
chunk {0} main.34c2fb4b05da249393db.bundle.js (main) 3.97 MB [initial] [rendered]
chunk {1} styles.f1b5f293ba4b13abcdbb.bundle.css (styles) 618 kB [initial] [rendered]
chunk {2} inline.48dff7d85670862c6bca.bundle.js (inline) 1.43 kB [entry] [rendered]
Desired behavior
The wiki says
vendor-chunk –vendor-chunk (aliases: -vc) default value: true Use a separate bundle containing only vendor libraries.
Yet there is no vendor bundle. Did this change? Is the documentation out of date? Why did it change? Is there some guidance one way or another as to why we should have a vendor chunk or not?
I can see that it would be useful for caching (assuming it gets the same hash if the content doesn’t change)? Is there any benefit in splitting and having two parallel requests?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Angular Should I use the vendorChunk in production
It depends on your use case. The advantage of not having a separate vendor chunk is that you'll be able to get a...
Read more >RAID setup - Linux Raid Wiki
mdadm: chunk size defaults to 64K mdadm: array /dev/md0 started. Have a look in /proc/mdstat. You should see that the array is running....
Read more >history
ApiBase::$messageMap is no longer public. Code attempting to access it will result in a PHP fatal error. * $wgUserEmailUseReplyTo is now true by...
Read more >Optimization - webpack
Tells webpack to determine and flag chunks which are subsets of other chunks in a way that subsets don't have to be loaded...
Read more >POWER7 and POWER7+ Optimization and Tuning Guide
1.5.3 Deep performance optimization guidelines. ... capabilities of non-IBM products should be addressed to the suppliers of those products.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, it was changed by this commit. Essentially vendor chunk is disabled, when build optimizer is enabled as this improves results of dead code elimination. And since build optimizer in 1.5 is enabled by default for --prod builds the vendor chunk is disabled.
I think it should be added to this section of documentation: https://github.com/angular/angular-cli/wiki/build#--dev-vs---prod-builds.
Because of dead code elimination and tree shaking you will often get different vendor chunk hash even when changing application code only, so it is less useful for production builds now. In development it is still very useful to improve rebuild speed as there are less optimizations involved, hash stays the same and there is no need to rebuild vendor files, when something in the application is changed.
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.