You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 25, 2024. It is now read-only.
@@ -231,6 +231,38 @@ If the global types are missing for your IDE, update your `tsconfig.json` with:
231
231
232
232
If you are using ESLint, you might get `@typescript-eslint/no-unused-vars` warning with `<script setup>`. You can disable it and add `noUnusedLocals: true` in your `tsconfig.json`, Volar will infer the real missing locals correctly for you.
233
233
234
+
## Configurations
235
+
236
+
<details>
237
+
<summary>
238
+
Ref Sugar (take 2)
239
+
</summary>
240
+
241
+
In v0.5.x, we shipped the **experimental**[Ref Sugar (take 2)](https://github.com/vuejs/rfcs/discussions/369) implementation based on Vue 3's [`@vue/ref-transform`](https://github.com/vuejs/vue-next/tree/master/packages/ref-transform) package. **Use at your own risk!**
242
+
243
+
To enabled it, pass the option:
244
+
245
+
```ts
246
+
ScriptSetup({
247
+
refTransform: true
248
+
})
249
+
```
250
+
251
+
To get TypeScript support, update your `tsconfig.json` with:
252
+
253
+
```jsonc
254
+
{
255
+
"compilerOptions": {
256
+
"types": [
257
+
"unplugin-vue2-script-setup/types",
258
+
"unplugin-vue2-script-setup/ref-macros"
259
+
]
260
+
}
261
+
}
262
+
```
263
+
264
+
</details>
265
+
234
266
## Recommendations
235
267
236
268
If you enjoy using `<script setup>`, you might also want to try [`unplugin-auto-import`](https://github.com/antfu/unplugin-auto-import) to improve the DX even further.
@@ -242,6 +274,7 @@ If you enjoy using `<script setup>`, you might also want to try [`unplugin-auto-
242
274
-[x] Compile time macros `defineProps``defineEmits``withDefaults`
0 commit comments