fix(compiler-sfc): handle empty strings during template usage analysis of setup bindings (#4608)

fix #4599
This commit is contained in:
Thorsten Lünborg
2021-09-16 19:47:11 +02:00
committed by GitHub
parent fcd5422b4a
commit bdb1a7958b
3 changed files with 32 additions and 1 deletions

View File

@@ -202,6 +202,22 @@ return { props, a, emit }
}"
`;
exports[`SFC compile <script setup> dev mode import usage check attribute expressions 1`] = `
"import { defineComponent as _defineComponent } from 'vue'
import { bar, baz } from './x'
export default /*#__PURE__*/_defineComponent({
setup(__props, { expose }) {
expose()
const cond = true
return { cond, bar, baz }
}
})"
`;
exports[`SFC compile <script setup> dev mode import usage check components 1`] = `
"import { defineComponent as _defineComponent } from 'vue'
import { FooBar, FooBaz, FooQux, foo } from './x'