vue-use-vuex

Fixed: must call Vue.use(Vuex) before creating a store instance.
1,831 2
Install
npm install vue-use-vuex
Latest Version:0.2.2
Last Updated:Sep 9, 2017
Links: GitHub  ·  npm
Maintainer: hezedu

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'
    }

Related Packages

spyfu-vuex-helpers

Utility functions for Vuex.

2,459 9
vuex-pathify

Ridiculously simple Vuex setup + wiring

322,817 1,358
direct-vuex

Use and implement your Vuex store with TypeScript types. Compatible with the Vue...

90,286 255
undo-redo-vuex

A Vuex plugin for module namespaced undo and redo functionality. This plugin tak...

9,207 47
vuex-typescript-fsa

The helper which makes vuex more type-safety

7,911

Version History

Version Released License
0.2.2
0.2.1
0.2.0
0.0.1