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-replacement-does-not-work-if-any-route-resolve-invo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!