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

0

12

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?

Perished answered 26/3, 2019 at 10:41 Comment(3)
How looks like your Resolve service?Stunsail
Subscribing HttpClientPerished
#48236660Perished

© 2022 - 2024 — McMap. All rights reserved.