From 24a450ffe8d7211842a5e9e84f0d44b33b70c15a Mon Sep 17 00:00:00 2001 From: yutent Date: Tue, 30 May 2023 10:19:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=90=8E=E7=BC=80=E4=B8=BAmj?= =?UTF-8?q?s=E7=9A=84=E4=BE=9D=E8=B5=96=E5=BC=95=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/compile-vue.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/compile-vue.js b/lib/compile-vue.js index 1e4ad80..919dd94 100644 --- a/lib/compile-vue.js +++ b/lib/compile-vue.js @@ -179,7 +179,11 @@ export function parseJs( 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')) { name += '.vue' } else { @@ -252,7 +256,11 @@ export function parseJs( 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' } }