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