angular-cli
angular-cli copied to clipboard
Using @ngtools/webpack with ContextReplacementPlugin plugin does not create lazy routes chunks
OS?
Ubuntu 16.04
Versions.
@ngtools/webpack - 1.2.7
Repro steps.
- create simple webpack config with
@ngtools/webpackusage and app with lazy routes (e.g. this example repo https://github.com/daniele-zurico/webpack-aot) - add to webpack config plugins
ContextReplacementPluginusage like so
plugins: [
new webpack.ContextReplacementPlugin(
/angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/,
__dirname
),
- run build
npm run build - no chunks for lazy routes in
distfolder - comment out
ContextReplacementPluginin plugins, build, chunks created
Mention any other details that might be useful.
this check never passes with ContextReplacementPlugin usage
https://github.com/angular/angular-cli/blob/29b134d7018c7d4e2eed74715b30b28e56fdcd49/packages/%40ngtools/webpack/src/plugin.ts#L247
@hansl
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.