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' } }