Closed
Description
Hi thanks for this awesome cli tool, I landed here thanks to an official vuejs tweet. I have followed the suggestion but despite the 50 npm dependencies required by the webpack template I wasn't able to get HMR in my app where I use the vue router to render my components. I have created a simple repo where anytime I update a component the page gets reloaded
https://github.com/GianlucaGuarini/vue-hmr-test/blob/master/src/main.js
Am I doing something wrong? Any hint about how achieving HMR also with vue-router and vuex?
Activity
yyx990803 commentedon Jul 25, 2016
Vue hot-reload works through
vue-loader
, so only components imported from*.vue
files can be hot-relaoded.On a higher level, Webpack HMR works based on modules, so there's no way to magically hot-reload an inline component defined in a random file.
GianlucaGuarini commentedon Jul 26, 2016
Ok thanks Evan now it's clear. Probably a couple of lines about this in the doc would help other users as well
GianlucaGuarini commentedon Jul 26, 2016
@yyx990803 I have tried to follow your recommendations but it seems that the hot reloading is not handled properly check the video:
I have updated the test repo as well. Do you know any workaround?