import Vue from 'vue' import Vuex from 'vuex' import user from './modules/user' import persistedstate from "vuex-persistedstate"; // import createLogger from '../../../src/plugins/logger' 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({ plugins: [ persistedstate({ key: "VBI", }), ], modules, strict: debug // plugins: debug ? [createLogger()] : [] });