fix: type error

This commit is contained in:
vben
2020-11-12 22:20:15 +08:00
parent 21e0548e34
commit ecfb702b09
37 changed files with 83 additions and 73 deletions

View File

@@ -33,7 +33,7 @@ const dynamicImportTransform = function (env: any = {}): Transform {
try {
const files = glob.sync('src/views/**/**.{vue,tsx}', { cwd: process.cwd() });
const _code = `
return `
export default function (id) {
switch (id) {
${files
@@ -47,7 +47,6 @@ const dynamicImportTransform = function (env: any = {}): Transform {
}
}\n\n
`;
return _code;
} catch (error) {
console.error(error);
return code;