misc_pterodactyl-panel/resources/assets/scripts/store/index.js

27 lines
735 B
JavaScript
Raw Normal View History

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