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
Copy file name to clipboardExpand all lines: utils/generateReadme.js
+15-8Lines changed: 15 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,20 @@ import fs from 'fs'
2
2
3
3
importgetCommandfrom'./getCommand.js'
4
4
5
-
constsfcTypeSupportDoc=
6
-
'\n'+
7
-
'## Type Support for `.vue` Imports in TS\n'+
8
-
'\n'+
9
-
"Since TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates.\n"+
10
-
'\n'+
11
-
'However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using manual `h(...)` calls), you can run `Volar: Switch TS Plugin on/off` from VSCode command palette.\n'
5
+
constsfcTypeSupportDoc=[
6
+
'',
7
+
'## Type Support for `.vue` Imports in TS',
8
+
'',
9
+
'TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.',
10
+
'',
11
+
"If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471) that is more performant. You can enable it by the following steps:",
12
+
'',
13
+
'1. Disable the built-in TypeScript Extension',
14
+
" 1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette",
15
+
' 2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`',
16
+
'2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.',
17
+
''
18
+
].join('\n')
12
19
13
20
exportdefaultfunctiongenerateReadme({
14
21
projectName,
@@ -23,7 +30,7 @@ This template should help get you started developing with Vue 3 in Vite.
0 commit comments