const resultComps = {};

const requireComponent = import.meta.globEager('./**/*.vue');

Object.keys(requireComponent).map(fileName => {
  let name = fileName.replace(/^\.\/(.*)\.\w+$/, '$1');
  let arr = name.split('/');
  if (arr && arr.length > 0) {
    name = arr[arr.length - 1];
    name = name.replace('.vue', '');
  }
  resultComps[name] = requireComponent[fileName].default;
});
console.log('resultCompsl--------', resultComps);
export default resultComps;
