You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notice that the Vuex store state is undefined and that the Increment button doesn't work
Describe the bug
After changing vite: true in nuxt.config.js, the Vuex store is not initialized properly when starting a Nuxt 2 server that uses a basic Vuex store. Initial state is undefined. Here's a short video demonstrating the bug:
vite-vuex-store-bug.mov
Something interesting that's happening is that if you restart the server process while having the page open, sometimes the server is able to initialize the Vuex store and the hot reloading can scoop it up.
vite-vuex-store-bug-pt2.mov
Additional context
This is a fresh Nuxt 2 app with the latest bridge added.
Vuex store code was lifted from the official docs
The only config change is setting vite: true.
No errors were thrown in the server log output when running nuxi dev.
Logs
No response
The text was updated successfully, but these errors were encountered:
Environment
Darwin
v18.15.0
2.17.0
2.5.2
yarn@1.22.19
vite
head
,css
,plugins
,components
,buildModules
,modules
,axios
,build
,bridge
,serverHandlers
,devServerHandlers
,devServer
,typescript
,nitro
@nuxtjs/axios@5.13.6
()
,@nuxt/bridge@3.0.0-28132497.798694a
Reproduction
https://github.com/deleteme/nuxt2-bridge-vite-bug/tree/vite-with-vuex-store
Steps to reproduce:
vite-with-vuex-store
branchDescribe the bug
After changing
vite: true
in nuxt.config.js, the Vuex store is not initialized properly when starting a Nuxt 2 server that uses a basic Vuex store. Initial state is undefined. Here's a short video demonstrating the bug:vite-vuex-store-bug.mov
Something interesting that's happening is that if you restart the server process while having the page open, sometimes the server is able to initialize the Vuex store and the hot reloading can scoop it up.
vite-vuex-store-bug-pt2.mov
Additional context
This is a fresh Nuxt 2 app with the latest bridge added.
vite: true
.nuxi dev
.Logs
No response
The text was updated successfully, but these errors were encountered: