vue-use-vuex
Fixed: must call Vue.use(Vuex) before creating a store instance.
If you normally use vuex, just like this:
// Entry;;Vue;;
You Will get an Error:
WTF!
let's use vue-use-vuex to fixed it.
Install
npm install vue-use-vuex
Example
// Entry;; // Just should import once; // no problem!
webpack-1
If you used webpack 1.x, you should used loader's include:
var vueUseVuexPath = require; // ... test: /\.js$/ include: path vueUseVuexPath loader: 'babel-loader'