Store: HMR plugin is not working

Created on 2 Mar 2019  路  8Comments  路  Source: ngxs/store

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ X ] Bug report 
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => https://github.com/ngxs/store/blob/master/CONTRIBUTING.md
[ ] Other... Please describe:

Current behavior

After following documentation to implement hmr plugin, its not working. When making changes i get the following error "Error: The selector "app-root" did not match any elements"

Expected behavior

After hot reloads, there should be no error and changes should be reflected

Minimal reproduction of the problem with instructions

https://github.com/joaqcid/ngxs-hmr

What is the motivation / use case for changing the behavior?

N/A

Environment


Libs:
- @angular/core version: 7.1.0
- @ngxs/store version: 3.4.0

Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [X] Chrome (iOS) version 72.0.3626.119
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX

For Tooling issues:
- Node version: 10.15.1
- Platform: Mac

Others:

Most helpful comment

The fix has been released in v3.4.3!
Please test and confirm that it is working as expected.

All 8 comments

@splincode This is the issue we saw with NG 5.
It is working perfectly with my production project. Not sure what the issue is here.

I'm having the exact same issue. I followed the NGXS written tutorial for adding HMR support to my existing application. When I serve with HMR successfully and then make a component template change, HMR sees the update as expected, but I get a similar error in Chrome's console as @joaqcid

screen shot 2019-03-06 at 12 27 14 pm

Try install new Dev version

$ npm install @ngxs/hmr-plugin@dev

Try install new Dev version

$ npm install @ngxs/hmr-plugin@dev

worked!

The fix has been released in v3.4.3!
Please test and confirm that it is working as expected.

I'm experiencing the same issue in 3.5.1 with angular@next versions and ivy enabled.
Screenshot 2019-10-28 at 16 00 12

Please create repo for reproduce

@MatissJanis Could you report this as a separate issue because it seems to be Ivy related. It would be good to track it on its own. (Please provide a repo for reproduction too)

Was this page helpful?
0 / 5 - 0 ratings