gamebrary/src/store/index.js

24 lines
522 B
JavaScript
Raw Normal View History

2018-10-19 05:15:28 +00:00
/* eslint no-shadow: ["error", { "allow": ["state"] }] */
import Vue from 'vue';
import Vuex from 'vuex';
import VuexPersist from 'vuex-persist';
import state from './state';
import actions from './actions';
import mutations from './mutations';
import getters from './getters';
Vue.use(Vuex);
const vuexLocalStorage = new VuexPersist({
key: 'vuex',
storage: window.localStorage,
});
export default new Vuex.Store({
state,
actions,
mutations,
getters,
plugins: [vuexLocalStorage.plugin],
});