const context = require.context("./", true, /\.vue$/);
const cmps = {};
context.keys().forEach((key) => {
if (key.includes("components")) {
const component = context(key).default;
cmps[component.name] = component;
}
});
//
components: {
...cmps,
},