Skip to content
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: support webpack 2.4 chunk name annotation for "async-import" #9

Open
wants to merge 2 commits into
base: AST
Choose a base branch
from

Conversation

pglazkov
Copy link

Since version 2.4 Webpack supports annotating import() calls with the name of the chunk:

import(/* webpackChunkName: "my-chunk-name" */ "module")

This pull request adds the implementation of adding that annotation comment if the "chunkName" option is provided as part of the route, like so:

loadChildren: 'app/module-container/child-module#ChildModule?chunkName=my-chunk-name'

@shaungrady
Copy link

shaungrady commented Nov 16, 2017

This would be wonderful to have. @shlomiassaf Is this project still being supported?

@pglazkov
Copy link
Author

@shaungrady As an alternative you might want to try angular-named-lazy-chunks-webpack-plugin - it automatically generates chunk names based on the module names, so you don't need to add any annotations in code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants