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
My apps has used vuex, and it can run in the development environment.
But when i run vite build, it happen this error on browser:
index.js:9 Uncaught TypeError: Cannot read property 'state' of undefined
at index.js:9
at n (index.js:1)
at Object.get value [as value] (index.js:1)
at Object.get (index.js:1)
at Object.get (index.js:1)
at index.js:9
at Vn (index.js:1)
at Proxy.<anonymous> (index.js:9)
at Proxy.<anonymous> (index.js:1)
at nt (index.js:1)
(anonymous) @ index.js:9
n @ index.js:1
get value @ index.js:1
(anonymous) @ index.js:1
get @ index.js:1
(anonymous) @ index.js:9
Vn @ index.js:1
(anonymous) @ index.js:9
(anonymous) @ index.js:1
nt @ index.js:1
(anonymous) @ index.js:1
n @ index.js:1
G @ index.js:1
$ @ index.js:1
V @ index.js:1
j @ index.js:1
S @ index.js:1
P @ index.js:1
T @ index.js:1
C @ index.js:1
S @ index.js:1
P @ index.js:1
T @ index.js:1
C @ index.js:1
S @ index.js:1
P @ index.js:1
T @ index.js:1
C @ index.js:1
Show 28 more frames
This seems to be because vuex can't pack?
This is my code which use vuex $store.
Why are people already using the internal instance and the ctx? This is so wrong. If you are using the composition API, use provide/inject. Avoid getCurrentInstance() in any way possible. It's only meant for libraries.
Closing because vuex@next is verified to be working with current release of Vite. Please make sure you are using the correct version of vuex and following the correct usage: https://github.com/vuejs/vuex/tree/4.0
My apps has used vuex, and it can run in the development environment.
But when i run vite build, it happen this error on browser:
This seems to be because vuex can't pack?
This is my code which use vuex $store.
And I don't know if I wrote it wrong.
The text was updated successfully, but these errors were encountered: