gamebrary/src/store/index.js
2019-11-08 12:56:03 -07:00

23 lines
508 B
JavaScript
Executable file

/* 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],
});