Closed
Description
Versions
Angular CLI: 1.6.6
Node: 8.9.4
OS: linux x64
Angular: 5.2.2
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router, service-worker
@angular/cdk: 5.1.0
@angular/cli: 1.6.6
@angular/material: 5.1.0
@angular-devkit/build-optimizer: 0.0.42
@angular-devkit/core: 0.0.29
@angular-devkit/schematics: 0.0.52
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.6
@schematics/angular: 0.1.17
typescript: 2.4.2
webpack-bundle-analyzer: 2.9.2
webpack: 3.10.0
Repro steps
- Create an angular 5 app
- In the main root module load 2 routes by module, but not lazy loaded.
- In one of the child modules, lazy load subsequent modules
Observed behavior
Error thrown when loading the lazy route. When search for the chunk expected in the filesystem it is not there.
Desired behavior
The lazy loaded route is loaded via a chunk create created by webpack
Mention any other details that might be useful (optional)
SO question raised, but nobody has an answer:
https://stackoverflow.com/questions/48523411/angular-5-with-angular-cli-non-lazy-loading-modules-in-the-router
Demo code of the exact issue on github:
https://github.com/jdcrecur/ang5ModuleRouting