Search code examples
nativescriptnativescript-vuewebpack-hmr

Is it possible to use nativescript preview functionality with HMR?


I'm using the 'tns preview' command for debugging my app, but HMR doesn't seem to be working. I've generated a blank vue project using the 'tns create' command and started it with the preview functionality. The application is successfully deployed to an Android device, but any code changes I make won't be applied to the device. Is this not supported or am I doing something wrong?


Solution

  • I managed to get it to work by adding the following option in the webpack config file:

    watchOptions: { poll: 1000 // Check for changes every second }