Skip to content

Commit 3093bd1

Browse files
authored
docs: remove env.d.ts mentions (vitejs#20133)
1 parent d7d8cd7 commit 3093bd1

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

docs/config/shared-options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export default defineConfig({
5454
```
5555

5656
::: tip NOTE
57-
For TypeScript users, make sure to add the type declarations in the `env.d.ts` or `vite-env.d.ts` file to get type checks and Intellisense.
57+
For TypeScript users, make sure to add the type declarations in the `vite-env.d.ts` file to get type checks and Intellisense.
5858

5959
Example:
6060

docs/guide/api-hmr.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ 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 create an `env.d.ts` in the `src` directory 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 create an `vite-env.d.ts` in the `src` directory so TypeScript picks up the type definitions:
6666
67-
```ts
67+
```ts [vite-env.d.ts]
6868
/// <reference types="vite/client" />
6969
```
7070

docs/guide/features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ For example, to make the default import of `*.svg` a React component:
153153
export default content
154154
}
155155
```
156-
- The file containing the reference to `vite/client`:
156+
- The file containing the reference to `vite/client` (normally `vite-env.d.ts`):
157157
```ts
158158
/// <reference types="./vite-env-override.d.ts" />
159159
/// <reference types="vite/client" />

0 commit comments

Comments
 (0)