Skip to content

Commit b30db80

Browse files
committed
Review
1 parent 1092356 commit b30db80

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

docs/guide/api-hmr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ if (import.meta.hot) {
6262
6363
## IntelliSense for TypeScript
6464
65-
Vite provides type definitions for `import.meta.hot` in [`vite/client.d.ts`](https://github.com/vitejs/vite/blob/main/packages/vite/client.d.ts). You can add "vite/client" in the `tsconfig` so TypeScript picks up the type definitions:
65+
Vite provides type definitions for `import.meta.hot` in [`vite/client.d.ts`](https://github.com/vitejs/vite/blob/main/packages/vite/client.d.ts). You can add "vite/client" in the `tsconfig.json` so TypeScript picks up the type definitions:
6666
6767
```json [tsconfig.json]
6868
{

docs/guide/features.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,10 @@ For example, to make the default import of `*.svg` a React component:
153153
export default content
154154
}
155155
```
156-
- If you are using `compilerOptions.types`, update `tsconfig.json` to include your override file:
156+
- If you are using `compilerOptions.types`, ensure the file is included in `tsconfig.json`:
157157
```json [tsconfig.json]
158158
{
159-
"compilerOptions": {
160-
"types": ["./vite-env-override.d.ts", "vite/client"]
161-
}
159+
"include": ["src", "./vite-env-override.d.ts"]
162160
}
163161
```
164162
- If you are using triple-slash directives, update the file containing the reference to `vite/client` (normally `vite-env.d.ts`):

packages/create-vite/template-svelte-ts/tsconfig.app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"target": "ES2022",
66
"useDefineForClassFields": true,
77
"module": "ESNext",
8-
"types": ["vite/client"],
8+
"types": ["svelte", "vite/client"],
99
"noEmit": true,
1010
/**
1111
* Typecheck JS in `.svelte` and `.js` files by default.

0 commit comments

Comments
 (0)