fix(useDescriptorStore): simplify async component import logic
gitea/salix-front/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2025-03-25 11:54:14 +01:00
parent 9446202dee
commit c0e9efc5d8
1 changed files with 1 additions and 3 deletions

View File

@ -16,9 +16,7 @@ export const useDescriptorStore = defineStore('descriptorStore', () => {
for (const file in files) {
const name = file.split('/').at(-1).slice(0, -19).toLowerCase();
const descriptor = moduleParser[name] ?? name;
currentDescriptors[descriptor + 'Fk'] = defineAsyncComponent(
() => import(/* @vite-ignore */ file),
);
currentDescriptors[descriptor + 'Fk'] = defineAsyncComponent(files[file]);
}
setDescriptors(currentDescriptors);
return currentDescriptors;