nativescript-vue / nativescript-vue-navigator

A simple router for NativeScript-Vue, built on top of $navigateTo to simplify routing from within components
MIT License
98 stars 10 forks source link

Problem with hot module reload #53

Open luiguild opened 4 years ago

luiguild commented 4 years ago

Clean project package.json

...
"dependencies": {
    ...
    "nativescript-vue": "^2.6.1",
    "nativescript-vue-navigator": "^1.2.0",
    "tns-core-modules": "^6.5.1",
    ...
}
...

router.js

...
const routes = {
  App: {
    component: App
  }
}
...

main.vue

...
    Navigator(
      defaultRoute="App"
    )
....

app.vue

<template lang="pug">
Page(
  actionBarHidden="false"
)
  ActionBar(title="NativeScript-Vue!")
  GridLayout(
    columns="*",
    rows="*"
  )
    Label.message(
      :text="msg",
      col="0",
      row="0"
    )
</template>

<script >
export default {
  data () {
    return {
      msg: 'hello world!'
    }
  }
}
</script>

When you change any template value or even the structure, all works fine, but when you change any script value/method/anything, server say that application it's refreshed, but nothing happens, you must need stop the server, clean platform and then start again...

When I remove the 'main.vue' file from render, and change to 'app.vue' directly (out of the router) anything works well...

Any ideas?

luiguild commented 4 years ago

bump

gravataLonga commented 4 years ago

@luiguild hot module reload not work with any package/plugin on vue. It's a old issue already know.