0.2.2 • Published 7 years ago

vue-use-vuex v0.2.2

Weekly downloads
251
License
-
Repository
github
Last release
7 years ago

vue-use-vuex

Fixed: must call Vue.use(Vuex) before creating a store instance.

If you normally use vuex, just like this:

// Entry
import Vue from 'vue';
import Vuex from 'vuex';
Vue.use(Vuex);
import 'some-store.js';

You Will get an Error: image WTF!

let's use vue-use-vuex to fixed it.

Install

npm install vue-use-vuex

Example

// Entry
import Vue from 'vue';
import 'vue-use-vuex'; // Just should import once
import 'some-store.js';

// no problem!

webpack-1

If you used webpack 1.x, you should used loader's include:

var vueUseVuexPath = require.resolve('vue-use-vuex');

// ...
    {
      test: /\.js$/,
      include: [path.join(__dirname, "src"), vueUseVuexPath],
      loader: 'babel-loader'
    }
0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.0.1

7 years ago