PteroTheme/resources/assets/scripts/store/index.js

25 lines
566 B
JavaScript
Raw Normal View History

import Vue from 'vue';
2018-06-03 23:45:01 +01:00
import Vuex from 'vuex';
2018-07-16 00:57:00 +01:00
import server from "./modules/server";
import auth from "./modules/auth";
2018-06-03 23:45:01 +01:00
Vue.use(Vuex);
const store = new Vuex.Store({
2018-06-06 07:42:34 +01:00
strict: process.env.NODE_ENV !== 'production',
modules: { auth },
});
if (module.hot) {
module.hot.accept(['./modules/auth'], () => {
const newAuthModule = require('./modules/auth').default;
// const newServerModule = require('./modules/server').default;
store.hotUpdate({
modules: { newAuthModule },
});
2018-06-03 23:45:01 +01:00
});
}
2018-06-03 23:45:01 +01:00
export default store;