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: docs/guide/features.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,13 @@ Note that because `esbuild` only performs transpilation without type information
38
38
39
39
### Client Types
40
40
41
-
Vite's default types are for its Node.js API. To shim the environment of client side code in a Vite application, add `vite/client` to `compilerOptions.types` of your `tsconfig`:
41
+
Vite's default types are for its Node.js API. To shim the environment of client side code in a Vite application, add a `d.ts` declaration file:
42
+
43
+
```typescript
44
+
/// <referencetypes="vite/client" />
45
+
```
46
+
47
+
Also, you can add `vite/client` to `compilerOptions.types` of your `tsconfig`:
42
48
43
49
```json
44
50
{
@@ -48,12 +54,6 @@ Vite's default types are for its Node.js API. To shim the environment of client
0 commit comments