augury icon indicating copy to clipboard operation
augury copied to clipboard

Provide a way to refresh augury when using webpack Hot Module Replacement

Open aitboudad opened this issue 9 years ago • 5 comments

I get the following message after updating with hmr:

Cannot find element associated with node 0 0 0

aitboudad avatar Dec 05 '16 12:12 aitboudad

@aitboudad My initial thought is this is because HMR hotpatches your code and whatever that does, breaks augury from correctly parsing the Angular root element. We will need to research this in order to confirm it. A potential fix for you could be to introduce polling with webpack, for a full page-refresh.

We will be investigating this in order to find a way to fix it. Do you per chance have an example app, or boilerplate that you started your project from?

mobinni avatar Dec 05 '16 17:12 mobinni

check https://github.com/jschwarty/angularcli-hmr-example

npm run serve:hmr

aitboudad avatar Dec 05 '16 19:12 aitboudad

@aitboudad Thank you, we will try to get to this as soon as possible

mobinni avatar Dec 05 '16 19:12 mobinni

when updating the title of AppComponent the state component disappear

augry

I have a difference behavior on my project but I couldn't reproduce it on the example app.

aitboudad avatar Dec 05 '16 19:12 aitboudad

I solved my issue with hacky way :)

module.hot.dispose(() => {
    ....
    ngModule.injector.get(TestabilityRegistry)._applications.clear();
    ngModule.injector.get(NgZone)._onStable.emit();
   ...
});

aitboudad avatar Jan 24 '17 12:01 aitboudad