Skip to content

Commit 6e49b4a

Browse files
authored
Update overview.md
The plugin is NOT recommended for take-over as per original maintainer of Volar vuejs/language-tools#471 (comment)
1 parent ee2815e commit 6e49b4a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/guide/typescript/overview.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ See also:
5757

5858
> This section only applies for VSCode + Volar.
5959
60-
To get Vue SFCs and TypeScript working together, Volar creates a separate TS language service instance patched with Vue-specific support, and uses it in Vue SFCs. At the same time, plain TS files are still handled by VSCode's built-in TS language service, which is why we need [TypeScript Vue Plugin](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to support Vue SFC imports in TS files. This default setup works, but for each project we are running two TS language service instances: one from Volar, one from VSCode's built-in service. This is a bit inefficient and can lead to performance issues in large projects.
60+
To get Vue SFCs and TypeScript working together, Volar creates a separate TS language service instance patched with Vue-specific support, and uses it in Vue SFCs. At the same time, plain TS files are still handled by VSCode's built-in TS language service, which is why we need [Vue Language Features (Volar)]([https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin](https://marketplace.visualstudio.com/items?itemName=Vue.volar)) to support Vue SFC imports in TS files. This default setup works, but for each project we are running two TS language service instances: one from Volar, one from VSCode's built-in service. This is a bit inefficient and can lead to performance issues in large projects.
6161

6262
Volar provides a feature called "Takeover Mode" to improve performance. In takeover mode, Volar provides support for both Vue and TS files using a single TS language service instance.
6363

@@ -71,6 +71,8 @@ To enable Takeover Mode, you need to disable VSCode's built-in TS language servi
7171

7272
<img src="./images/takeover-mode.png" width="590" height="426" style="margin:0px auto;border-radius:8px">
7373

74+
Note: Once takeover mode is activated, you no longer need Typescript Vue Plugin (Volar)
75+
7476
### Note on Vue CLI and `ts-loader`
7577

7678
In webpack-based setups such as Vue CLI, it is common to perform type checking as part of the module transform pipeline, for example with `ts-loader`. This, however, isn't a clean solution because the type system needs knowledge of the entire module graph to perform type checks. Individual module's transform step simply is not the right place for the task. It leads to the following problems:

0 commit comments

Comments
 (0)