gamebrary/src/store/index.js

24 lines
508 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({
2019-11-08 19:56:03 +00:00
key: 'vuex',
storage: window.localStorage,
2018-10-19 05:15:28 +00:00
});
export default new Vuex.Store({
2019-11-08 19:56:03 +00:00
state,
actions,
mutations,
getters,
plugins: [vuexLocalStorage.plugin],
2018-10-19 05:15:28 +00:00
});