Skip to content

Ability to configure minChunks for common chunk #8458

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

Closed
aksyonov opened this issue Nov 12, 2017 · 5 comments
Closed

Ability to configure minChunks for common chunk #8458

aksyonov opened this issue Nov 12, 2017 · 5 comments
Labels
feature Issue that requests a new feature

Comments

@aksyonov
Copy link

Bug Report or Feature Request (mark with an x)

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

Versions.

Angular CLI: 1.5.0
Node: 8.6.0
OS: win32 x64
Angular: 5.0.0
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

@angular/cdk: 5.0.0-rc0
@angular/cli: 1.5.0
@angular/flex-layout: 2.0.0-beta.10
@angular/material: 5.0.0-rc0
@angular-devkit/build-optimizer: 0.0.31
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.34
@ngtools/json-schema: 1.1.0
typescript: 2.4.2
webpack: 3.8.1

Desired functionality.

I would like to configure minChunks parameter for common chunk e.g. in angular-cli.json file, without having to eject the angular webpack.config.js file.

Mention any other details that might be useful.

For example if two of my lazy-loaded modules have some common huge dependency it'll end up in common chunk and will be loaded with all lazy-loaded modules in application. If I could set minChunks to 3, common chunk will be much smaller.

@Brocco Brocco added the feature Issue that requests a new feature label Nov 14, 2017
@adamdport
Copy link

I just did a fairly lengthy refactor to try to take advantage of lazy loading, but was thrown for a loop when I saw my common chunk multiply 6x. I ended up disabling it for now...

Can anyone speak to whether or not this is being considered?

@clydin
Copy link
Member

clydin commented Sep 28, 2018

The common chunk functionality is significantly more advanced in the latest version of the CLI (6.x+) and will no longer create a massive single common chunk. As such, this type of configurability is no longer relevant.

@clydin clydin closed this as completed Sep 28, 2018
@adamdport
Copy link

@clydin is there anywhere we can read about its approach? The docs still just say

--common-chunk
Use a separate bundle containing code used across multiple bundles.

@clydin
Copy link
Member

clydin commented Sep 28, 2018

There's no official documentation but here is a comment I wrote providing some background on the new behavior: #10364 (comment)

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

No branches or pull requests

5 participants