Skip to content

hmr restarts application when syncing on both platforms #5080

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
endarova opened this issue Oct 17, 2019 · 0 comments
Closed

hmr restarts application when syncing on both platforms #5080

endarova opened this issue Oct 17, 2019 · 0 comments
Assignees
Labels
bug hmr no-changelog The issue is present only in `next` versions and was not included in official version.
Milestone

Comments

@endarova
Copy link
Contributor

Environment

  • CLI: next
  • Plugin(s): nativescript-dev-webpack@next

Describe the bug
When livesyncing on both platforms changes in js, xml, css files cause the application to restart

To Reproduce

  1. tns create my_app --js
  2. npm i nativescript-dev-webpack@next --save-dev --save-exact
  3. node_modules/.bin/update-ns-webpack" --deps --configs
  4. Start android emulator and ios simulator
  5. tns run
  6. change something in main-view-model.js file
    Result: the application restarts when applying the changes, sometimes on both devices, sometimes on one of them

Expected behavior
Changes in js, css, xml files should not cause app restart

@endarova endarova added bug no-changelog The issue is present only in `next` versions and was not included in official version. hmr labels Oct 17, 2019
@Fatme Fatme self-assigned this Oct 18, 2019
@Fatme Fatme added this to the 6.2.0 milestone Oct 18, 2019
Fatme added a commit that referenced this issue Oct 18, 2019
The NativeScript CLI persists the hash of the next hmr compilation locally and based on that decides if the reported hash is valid or not. However, in case when `tns run` command is executed, the application is randomly restarted on some devices. This happens as in this situation we have 2 webpack processes but the hmr hash is not persisted per platform.

Rel to: #5080
DimitarTachev pushed a commit that referenced this issue Oct 25, 2019
The NativeScript CLI persists the hash of the next hmr compilation locally and based on that decides if the reported hash is valid or not. However, in case when `tns run` command is executed, the application is randomly restarted on some devices. This happens as in this situation we have 2 webpack processes but the hmr hash is not persisted per platform.

Rel to: #5080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug hmr no-changelog The issue is present only in `next` versions and was not included in official version.
Projects
None yet
Development

No branches or pull requests

3 participants