import Vue from 'vue' import Vuex from 'vuex' // import createLogger from '../../../src/plugins/logger' // vue-x Vue.use(Vuex) const debug = process.env.NODE_ENV !== 'production' let files = require.context('./modules', false, /\.js$/) let modules = {} files.keys().map((key) => { modules[key.replace(/(\.\/|\.js)/g, '')] = files(key).default }) export default new Vuex.Store({ modules, strict: debug // plugins: debug ? [createLogger()] : [] })