Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Commit 20fe442

Browse files
TrungRuetaantfuShinigami92
authored
doc : add guide volar vue 2 template setup (#32) (#33)
Co-authored-by: Anthony Fu <[email protected]> Co-authored-by: Shinigami <[email protected]>
1 parent 9ed60d3 commit 20fe442

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

+15
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,21 @@ If the global types are missing for your IDE, update your `tsconfig.json` with:
244244
}
245245
```
246246

247+
###### Support Vue 2 template
248+
249+
Volar preferentially supports Vue 3. Vue 3 and Vue 2 template has some different. You need to set the `experimentalCompatMode` option to support Vue 2 template.
250+
251+
```jsonc
252+
{
253+
"compilerOptions": {
254+
...
255+
},
256+
"vueCompilerOptions": {
257+
"experimentalCompatMode": 2
258+
},
259+
}
260+
```
261+
247262
###### ESLint
248263

249264
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.

0 commit comments

Comments
 (0)