From f0c25adf2c5edc840d72536c31f2594257b591c7 Mon Sep 17 00:00:00 2001 From: TrungRueta Date: Wed, 1 Sep 2021 00:21:35 +0700 Subject: [PATCH 1/2] doc : add guide volar vue 2 template setup (#32) --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 37a2bc6..8c25960 100644 --- a/README.md +++ b/README.md @@ -244,6 +244,21 @@ If the global types are missing for your IDE, update your `tsconfig.json` with: } ``` +###### Support Vue 2 template + +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. + +```jsonc +{ + "compilerOptions": { + ... + }, + "vueCompilerOptions": { + "experimentalCompatMode": 2 + }, +} +``` + ###### ESLint If you are using ESLint, you might get `@typescript-eslint/no-unused-vars` warning with `