hot-module-replacement

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

好久不见. 提交于 2019-12-03 03:25:33
问题 (Confirmed an issue even with Angular 7). Let's get this fixed! I'm using HMR as set up here: https://github.com/angular/angular-cli/wiki/stories-configure-hmr from a fresh ng new build. If I change any component and make it lazy loaded, angular HMR will hot-reload everything, making the page sync slower. I know this because it's by default set-up to console.log every module that is being reloaded, and when I'm using a lazy route, it logs everything. But when I change that component to non

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

╄→гoц情女王★ 提交于 2019-12-02 16:55:47
(Confirmed an issue even with Angular 7). Let's get this fixed! I'm using HMR as set up here: https://github.com/angular/angular-cli/wiki/stories-configure-hmr from a fresh ng new build. If I change any component and make it lazy loaded, angular HMR will hot-reload everything, making the page sync slower. I know this because it's by default set-up to console.log every module that is being reloaded, and when I'm using a lazy route, it logs everything. But when I change that component to non-lazy-loaded, it logs only a few small components. Therefore, when I'm using HMR and lazy routes, my app

Angular 7+: HMR (Hot Module Replacement) does not work if any route-resolve involved

爱⌒轻易说出口 提交于 2019-11-30 13:51:55
HMR (Hot Module Replacement) is a great functionality, that works properly if no "Route-resolve" (see below) is present. If I remove resolve here: { path: 'new', component: BookNewComponent, data: { breadcrumb: 'book.new.breadcrumb' }, resolve: { staticData: StaticDataResolve } }, HMR is working again. If resolve exists -> HMR reloads the whole app instead of a specific component. How can I solve this problem? 来源: https://stackoverflow.com/questions/55355133/angular-7-hmr-hot-module-replacement-does-not-work-if-any-route-resolve-invo

Can't get Webpack 2 HMR React to work

不问归期 提交于 2019-11-29 15:14:35
Currently I'm struggling to get HMR working in my Webpack 2 setup. I'll explain my entire setup so I hope this is enough for someone to understand what's happening. The structure of my project: config dev.js prod.js dist css js index.html node_modules src components // some JavaScript components shared stylesheets index.js .babelrc package.json webpack.config.js This are the contents of my webpack.config.js file, placed in the root of my project: function buildConfig(env) { return require('./config/' + env + '.js')(env) } module.exports = buildConfig; So in this file I've the option to pass

Angular 7+: HMR (Hot Module Replacement) does not work if any route-resolve involved

被刻印的时光 ゝ 提交于 2019-11-27 18:12:28
问题 HMR (Hot Module Replacement) is a great functionality, that works properly if no "Route-resolve" (see below) is present. If I remove resolve here: { path: 'new', component: BookNewComponent, data: { breadcrumb: 'book.new.breadcrumb' }, resolve: { staticData: StaticDataResolve } }, HMR is working again. If resolve exists -> HMR reloads the whole app instead of a specific component. How can I solve this problem? 来源: https://stackoverflow.com/questions/55355133/angular-7-hmr-hot-module