Angular CLI HMR with Lazy-Loaded routes hot-reloads the whole thing

╄→гoц情女王★ 提交于 2019-12-02 16:55:47

This angular-cli wiki page is deprecated: https://github.com/angular/angular-cli/issues/14053

Angular-HMR + lazy routes is currently not supported: https://github.com/PatrickJS/angular-hmr/issues/76

For a working and non-trivial solution, have a look to https://github.com/wags1999/angular-hmr-lazy-components

Just as a warning to folks getting this issue. I updated angular-cli and hmr stopped working. All it showed is empty page.

Working:

"@angular-devkit/build-angular": "0.10.2",
"@angular/cli": "^7.0.3",
"@angular/compiler-cli": "^7.0.3",

Not working:

"@angular-devkit/build-angular": "~0.6.8",
"@angular/cli": "~7.0.6",
"@angular/compiler-cli": "^7.1.0",
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!