fix(compiler-sfc): handle empty strings during template usage analysis of setup bindings (#4608)
fix #4599
This commit is contained in:
@@ -1826,7 +1826,7 @@ function resolveTemplateUsageCheckString(sfc: SFCDescriptor) {
|
||||
|
||||
function stripStrings(exp: string) {
|
||||
return exp
|
||||
.replace(/'[^']+'|"[^"]+"/g, '')
|
||||
.replace(/'[^']*'|"[^"]*"/g, '')
|
||||
.replace(/`[^`]+`/g, stripTemplateString)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user