Skip to content

Commit

Permalink
fix(compiler-sfc): bail on import usage check when template has custo…
Browse files Browse the repository at this point in the history
…m lang

fix #4312
  • Loading branch information
yyx990803 committed Aug 16, 2021
1 parent a6c1db2 commit aae3725
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/compiler-sfc/src/compileScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit aae3725

Please sign in to comment.