ng-router-loader icon indicating copy to clipboard operation
ng-router-loader copied to clipboard

feat: support webpack 2.4 chunk name annotation for "async-import"

Open pglazkov opened this issue 7 years ago • 2 comments

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'

pglazkov avatar Apr 18 '17 05:04 pglazkov

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

shaungrady avatar Nov 16 '17 00:11 shaungrady

@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.

pglazkov avatar Nov 16 '17 06:11 pglazkov