NativeScript: Unable to get HMR working in Vue with TypeScript
Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
- CLI: 8.0.2
- Cross-platform modules:
- Android Runtime: ^8.0.0
- iOS Runtime: ^8.0.0
- XCode Version: 12.5.1
- Plugin(s):
Describe the bug
Trying to get a HMR working with TypeScript and Vue
To Reproduce
ns create --vue --ts ns-vue-app
# I also tested with ns create --vue ns-vue-app no typescript and get similar results
cd ns-vue-app
ns run ios
# app is now in simulator
# modify app/components/Home.vue so the message is changed
#save
Expected behavior
The modified message appears in the simulator
Sample project
Additional context
Running on macOS and Simulator is running iPad Air simulator
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 17 (4 by maintainers)
Yes with the current implementation - I’m working on improvements for Page HMR (other components that don’t trigger a page to be re-rendered work fine).
This PR is part of the effort: https://github.com/NativeScript/NativeScript/pull/9460
@trajano wish it was a trivial fix, though i do have a branch that is almost working, just need to revive it when i get the chance… Biggest pain point with it is preserving the navigation stack during refreshes.
Requires changes in both NativeScript (the above PR) and nativescript-vue - the latter being much less trivial to fix.