我将添加HMR (事例配置hmr)到我的角度项目,但取而代之的热重新加载,我得到它的满负荷。
升级到角度8,问题没有得到解决。
[HMR] Cannot apply update. Need to do a full reload!
...
[HMR] Error: Aborted because ./node_modules/raw-loader/index.js!./src/app/components/tabs/remark/remark.component.html is not accepted
Update propagation: ./node_modules/raw-loader/index.js!./src/app/components/tabs/remark/remark.component.html -> ./src/app/components/tabs/remark/remark.component.ts -> ./src/app/app.module.ts -> ./src/main.ts -> 0
at hotApply (http://localhost:4201/runtime.js:525:30)
at http://localhost:4201/runtime.js:363:22
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (http://localhost:4201/polyfills.js:3516:26)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.run (http://localhost:4201/polyfills.js:3275:43)
at http://localhost:4201/polyfills.js:4035:34
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (http://localhost:4201/polyfills.js:3548:31)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (http://localhost:4201/polyfills.js:3320:47)
at drainMicroTaskQueue (http://localhost:4201/polyfills.js:3726:35)发布于 2019-11-19 08:50:31
我以前经常像ng serve --hmr那样运行我的应用程序
一旦我开始使用hmr配置ng serve -c hmr
HMR开始工作。
您应该确保在angular.json和environment.ts中启用hmr。
https://stackoverflow.com/questions/56537929
复制相似问题