mirror of
https://github.com/romancm/gamebrary
synced 2024-12-23 09:33:09 +00:00
24 lines
522 B
JavaScript
24 lines
522 B
JavaScript
|
/* 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],
|
||
|
});
|