scriptSFC
Stability:
experimental ⚠️ Experimental feature, use at your riskEnabled Volar support for .ts | .tsx files.
| Features | Supported |
|---|---|
| Volar Plugin | ✅ |
Basic Usage
With jsxDirective
tsx
export default ({ foo }: { foo: number }) => (
<div v-if={foo === 1}>{foo}</div>
// ^ will be inferred as 1
)Volar Configuration
jsonc
{
"vueCompilerOptions": {
"plugins": ["@vue-macros/volar"],
"vueMacros": {
"scriptSFC": true,
},
},
}
zhiyuanzmj
Leo
Kevin Deng