Skip to content

Commit

Permalink
docs: tsconfig.json lib
Browse files Browse the repository at this point in the history
  • Loading branch information
poyoho committed May 5, 2022
1 parent 48d6b78 commit 22896e4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/guide/env-and-mode.md
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

0 comments on commit 22896e4

Please sign in to comment.