Skip to content

Commit

Permalink
docs: config hook is async (#4075)
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed Jul 2, 2021
1 parent d697ef3 commit 5c177db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/guide/api-plugin.md
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

0 comments on commit 5c177db

Please sign in to comment.