Skip to content
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

Vue router reloading to '/' when used with webpack-hot-middleware #1206

Closed
chopfitzroy opened this issue Feb 27, 2017 · 1 comment
Closed

Comments

@chopfitzroy
Copy link

Vue.js / vue-router versions

2.1.2 / 2.1.1

Reproduction Link

https://github.com/CrashyBang/vue-router-reload-bug

Steps to reproduce

  1. Once repo is set up run npm run src:dev and npm run app:dev and then in the app click on the Test One link.

  2. Now navigate back to the code base and modify src/logic/views/TestOne.html or src/logic/views/TestOne.js now instead of inserting the new code it just vue-router is resetting to /.

  3. This project was largely inspired by vuepack so there are a lot of code similarities expect in vuepack the live reloading works. It could be because I am not using the vue-loader (just vanilla JS)?

What is Expected?

Live reloading should insert new code into page and not do full reload to /

What is actually happening?

When code is modified vue-router is resetting to /

@posva
Copy link
Member

posva commented Feb 27, 2017

t could be because I am not using the vue-loader (just vanilla JS)

Yes, more specifically vue-loader uses https://github.com/vuejs/vue-hot-reload-api which uses what allows that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants