您好,我正在将 Angular CLI (beta.22) 与 HMR 一起使用。
它以某种方式正常工作,但现在每次更改都会刷新整个页面。控制台出现错误:
不应用更新。需要完全重新加载!(匿名函数)@dev-server.js:33ZoneDelegate.invoke@zone.js:232Zone.run@zone.js:114(匿名函数)@zone.js:502ZoneDelegate.invokeTask@zone。 js:265Zone.runTask @ zone.js:154drainMicroTaskQueue @ zone.js:401 vendor.bundle.js:55305 [HMR] 错误:已创建具有不同配置的平台。请先销毁它。在 assertPlatform ( http://localhost:4200/vendor.bundle.js:27579:15 ) 在http://localhost:4200/vendor.bundle.js:27564:16 在 bootstrap ( http://localhost:4200/ main.bundle.js:273:132 ) 在 hmrBootstrap ( http://localhost:4200/main.bundle.js:1094:5 ) 在 Object. ( http://localhost:4200/main.bundle.js:277:90) 在 Object.494 ( http://localhost:4200/main.bundle.js:288:30 ) 在webpack_require ( http://localhost:4200/inline.bundle.js:686:30 ) 在 hotApply ( http: //localhost:4200/inline.bundle.js:613:14 ) 在 hotUpdateDownloaded ( http://localhost:4200/inline.bundle.js:311:13 ) 在 hotAddUpdateChunk ( http://localhost:4200/inline.捆绑.js:291:13 )