Weex uses vuex to report errors-- Vue is not defined, solution

  1. weex uses vuex to report errors Uncaught ReferenceError: Vue is not defined
  2. if I introduce import Vue from"vue" into vuex/index.js, the webside will display normally, and if I don"t introduce iOS, the following is my code and error report. Please solve the problem with the boss who has used it
  3. .







entry.jsvuex

/configs/config.jsvuexindex.js,


/configs/webpack.common.conf.js

default

Mar.03,2021

add this judgment to your vuex/index.js file

if(WXEnvironment.platform!=='Web'){
    Vue.use(Vuex)
} 

has been solved, and you have found the answer. You need to add default


how to write

vuex.js to see if you can send out

when the whole store.js, is first injected for use on the page.
Menu