Skip to content
This repository was archived by the owner on Jul 26, 2021. It is now read-only.
Open
Changes from all 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
2 changes: 1 addition & 1 deletion guide/api-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Vite plugins can also provide hooks that serve Vite-specific purposes. These hoo
### `config`

- **Type:** `(config: UserConfig, env: { mode: string, command: string }) => UserConfig | null | void`
- **Kind:** `sync`, `sequential`
- **Kind:** `async`, `sequential`

Modify Vite config before it's resolved. The hook receives the raw user config (CLI options merged with config file) and the current config env which exposes the `mode` and `command` being used. It can return a partial config object that will be deeply merged into existing config, or directly mutate the config (if the default merging cannot achieve the desired result).

Expand Down