Subscribe on changes!

vue beta.7 may be causing problems with vue-router and vuex

avatar
May 4th 2020

This is not directly related to vite, but may be of interest for those who are using vuex, vue-router.

You can see a link to sample project that will cause this error here...

https://github.com/ais-one/vite-eg/tree/master/test

just do

npm i
npm run dev

and navigate to app on browser, you can see the error.

image

If change vue and sfc compiler to beta.4, the error will go away

If you comment out , it will also not show the error, but you will not have any routing

The package information is below

  "dependencies": {
    "vue": "^3.0.0-beta.7",
    "vue-router": "^4.0.0-alpha.9",
    "vuex": "^4.0.0-beta.1"
  },
  "devDependencies": {
    "vite": "^0.10.0",
    "@vue/compiler-sfc": "^3.0.0-beta.7"
  }
avatar
May 4th 2020

This is a bug on vue-next, as I quick fix, I would downgrade vue to beta.6.

avatar
May 4th 2020

Should be fixed in beta.8