]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(compiler-sfc): bail on import usage check when template has custom lang
authorEvan You <yyx990803@gmail.com>
Mon, 16 Aug 2021 20:08:52 +0000 (16:08 -0400)
committerEvan You <yyx990803@gmail.com>
Mon, 16 Aug 2021 20:08:52 +0000 (16:08 -0400)
fix #4312

packages/compiler-sfc/src/compileScript.ts

index 9e4a2ceb85a49a890ca60b924518a0dff407dcec..914cf28353110607b348e9e641bcd082a7f68516 100644 (file)
@@ -332,7 +332,7 @@ export function compileScript(
     }
 
     let isUsedInTemplate = true
-    if (isTS && sfc.template && !sfc.template.src) {
+    if (isTS && sfc.template && !sfc.template.src && !sfc.template.lang) {
       isUsedInTemplate = new RegExp(
         // #4274 escape $ since it's a special char in regex
         // (and is the only regex special char that is valid in identifiers)