2018-06-16 19:43:32 +00:00
|
|
|
import Vue from 'vue';
|
|
|
|
import Vuex from 'vuex';
|
2018-06-06 06:00:01 +00:00
|
|
|
import auth from './modules/auth';
|
|
|
|
|
2018-06-16 19:43:32 +00:00
|
|
|
Vue.use(Vuex);
|
|
|
|
|
2018-06-16 21:05:39 +00:00
|
|
|
const store = new Vuex.Store({
|
2018-06-06 06:42:34 +00:00
|
|
|
strict: process.env.NODE_ENV !== 'production',
|
2018-06-06 06:00:01 +00:00
|
|
|
modules: { auth },
|
2018-06-16 19:43:32 +00:00
|
|
|
});
|
2018-06-16 21:05:39 +00:00
|
|
|
|
|
|
|
if (module.hot) {
|
|
|
|
module.hot.accept(['./modules/auth'], () => {
|
|
|
|
const newAuthModule = require('./modules/auth').default;
|
|
|
|
|
|
|
|
store.hotUpdate({
|
|
|
|
modules: { newAuthModule },
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
export default store;
|