Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/guide/env-and-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ interface ImportMeta {
}
```

In order to be compatible with different environments within the browser, Such as [DOM](https://github.com/microsoft/TypeScript/blob/main/lib/lib.dom.d.ts), [WebWorker](https://github.com/microsoft/TypeScript/blob/main/lib/lib.webworker.d.ts), we should add the [lib](https://www.typescriptlang.org/tsconfig#lib) field in `tsconfig.json`.

```json
{
"lib": ["WebWorker"]
}
```

## Modes

By default, the dev server (`dev` command) runs in `development` mode and the `build` command run in `production` mode.
Expand Down
1 change: 0 additions & 1 deletion packages/vite/client.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/// <reference lib="dom" />
/// <reference path="./types/importMeta.d.ts" />

// CSS modules
Expand Down