修复后缀为mjs的依赖引入
parent
73ff200b87
commit
24a450ffe8
|
@ -179,7 +179,11 @@ export function parseJs(
|
||||||
name = name.replace(/^\//, urlJoin(DEPLOY_PATH, ASSETS_DIR))
|
name = name.replace(/^\//, urlJoin(DEPLOY_PATH, ASSETS_DIR))
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!name.endsWith('.js') && !name.endsWith('.vue')) {
|
if (
|
||||||
|
!name.endsWith('.js') &&
|
||||||
|
!name.endsWith('.mjs') &&
|
||||||
|
!name.endsWith('.vue')
|
||||||
|
) {
|
||||||
if (name.includes('components')) {
|
if (name.includes('components')) {
|
||||||
name += '.vue'
|
name += '.vue'
|
||||||
} else {
|
} else {
|
||||||
|
@ -252,7 +256,11 @@ export function parseJs(
|
||||||
name = name.replace(/^\//, urlJoin(DEPLOY_PATH, ASSETS_DIR))
|
name = name.replace(/^\//, urlJoin(DEPLOY_PATH, ASSETS_DIR))
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!name.endsWith('.js') && !name.endsWith('.vue')) {
|
if (
|
||||||
|
!name.endsWith('.js') &&
|
||||||
|
!name.endsWith('.mjs') &&
|
||||||
|
!name.endsWith('.vue')
|
||||||
|
) {
|
||||||
name += '.js'
|
name += '.js'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue