diff --git a/packages/compiler-sfc/src/compileScript.ts b/packages/compiler-sfc/src/compileScript.ts index 322f89b0805..0df407662ed 100644 --- a/packages/compiler-sfc/src/compileScript.ts +++ b/packages/compiler-sfc/src/compileScript.ts @@ -176,6 +176,11 @@ export function compileScript( const cssVars = sfc.cssVars const scriptLang = script && script.lang const scriptSetupLang = scriptSetup && scriptSetup.lang + const isJS = + scriptLang === 'js' || + scriptLang === 'jsx' || + scriptSetupLang === 'js' || + scriptSetupLang === 'jsx' const isTS = scriptLang === 'ts' || scriptLang === 'tsx' || @@ -205,7 +210,7 @@ export function compileScript( if (!script) { throw new Error(`[@vue/compiler-sfc] SFC contains no