-
Notifications
You must be signed in to change notification settings - Fork 12k
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
feat(@angular/cli): name lazy chunks #6881
Conversation
return name(); | ||
}; | ||
|
||
return new (webpack as any).NamedChunksPlugin(function (chunk: any) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's best practice for a constructor to return another class. Could you instead extends
NamedChunksPlugin
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
56deef3
to
d8dd3eb
Compare
Before: ``` $ ng build --no-progress Hash: ff03df269349b817eef4 Time: 11202ms chunk {0} 0.chunk.js, 0.chunk.js.map 1.61 kB {1} {3} [rendered] chunk {1} 1.chunk.js, 1.chunk.js.map 1.46 kB {0} {3} [rendered] chunk {2} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 160 kB {6} [initial] [rendered] chunk {3} main.bundle.js, main.bundle.js.map (main) 6.38 kB {5} [initial] [rendered] chunk {4} styles.bundle.js, styles.bundle.js.map (styles) 10.5 kB {6} [initial] [rendered] chunk {5} vendor.bundle.js, vendor.bundle.js.map (vendor) 2.16 MB [initial] [rendered] chunk {6} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered] ``` After: ``` $ ng build --no-progress Hash: 2bc12a89f40f3b4818b5 Time: 9613ms chunk {feature.module} feature.module.chunk.js, feature.module.chunk.js.map 1.46 kB {lazy.module} {main} [rendered] chunk {inline} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered] chunk {lazy.module} lazy.module.chunk.js, lazy.module.chunk.js.map 1.61 kB {feature.module} {main} [rendered] chunk {main} main.bundle.js, main.bundle.js.map (main) 6.38 kB {vendor} [initial] [rendered] chunk {polyfills} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 160 kB {inline} [initial] [rendered] chunk {styles} styles.bundle.js, styles.bundle.js.map (styles) 10.5 kB {inline} [initial] [rendered] chunk {vendor} vendor.bundle.js, vendor.bundle.js.map (vendor) 2.16 MB [initial] [rendered] ``` Fix angular#6700
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Followup to angular#6881 Also name chunks created via `import()` or `System.import()`.
Followup to angular#6881 Also name chunks created via `import()` or `System.import()`, and strip `.ngfactory` from the chunk name.
Followup to angular#6881 Also name chunks created via `import()` or `System.import()`, and strip `.ngfactory` from the chunk name.
Followup to #6881 Also name chunks created via `import()` or `System.import()`, and strip `.ngfactory` from the chunk name.
Followup to #6881 Also name chunks created via `import()` or `System.import()`, and strip `.ngfactory` from the chunk name.
Followup to angular#6881 Allow controlling chunk naming via the `--named-chunks` flag, which can be set on `.angular-cli.json` as well. Defaults to true in development, false in production.
Followup to angular#6881 Allow controlling chunk naming via the `--named-chunks` flag, which can be set on `.angular-cli.json` as well. Defaults to true in development, false in production.
Followup to angular#6881 Allow controlling chunk naming via the `--named-chunks` flag, which can be set on `.angular-cli.json` as well. Defaults to true in development, false in production.
Followup to angular#6881 Allow controlling chunk naming via the `--named-chunks` flag, which can be set on `.angular-cli.json` as well. Defaults to true in development, false in production.
Followup to angular#6881 Allow controlling chunk naming via the `--named-chunks` flag, which can be set on `.angular-cli.json` as well. Defaults to true in development, false in production.
Followup to angular#6881 Allow controlling chunk naming via the `--named-chunks` flag, which can be set on `.angular-cli.json` as well. Defaults to true in development, false in production.
Followup to angular#6881 Allow controlling chunk naming via the `--named-chunks` flag, which can be set on `.angular-cli.json` as well. Defaults to true in development, false in production.
Followup to #6881 Allow controlling chunk naming via the `--named-chunks` flag, which can be set on `.angular-cli.json` as well. Defaults to true in development, false in production.
Followup to angular#6881 Also name chunks created via `import()` or `System.import()`, and strip `.ngfactory` from the chunk name.
Followup to angular#6881 Allow controlling chunk naming via the `--named-chunks` flag, which can be set on `.angular-cli.json` as well. Defaults to true in development, false in production.
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. |
Before:
After:
Fix #6700