You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
558 B
22 lines
558 B
import { createStore } from 'vuex';
|
|
|
|
const modules = Object.fromEntries(
|
|
Object.entries(import.meta.globEager('./modules/*.js')).map((entry) => {
|
|
let arr = entry[0].split('/').pop().split('.');
|
|
arr.pop();
|
|
let moduleName = _.camelCase(arr.join('-'));
|
|
return [
|
|
moduleName,
|
|
{
|
|
...entry[1].default,
|
|
namespaced: true,
|
|
},
|
|
];
|
|
})
|
|
);
|
|
const store = createStore({
|
|
strict: process.env.NODE_ENV !== 'production',
|
|
modules,
|
|
});
|
|
export default store;
|