Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2151f70

Browse files
imxvsunmozongbluwy
authored
docs: explain mergeConfig skips null/undefined (#22325)
Co-authored-by: sunmozong <[email protected]> Co-authored-by: Bjorn Lu <[email protected]>
1 parent 0c162e9 commit 2151f70

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

docs/guide/api-javascript.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,8 @@ function mergeConfig(
312312

313313
Deeply merge two Vite configs. `isRoot` represents the level within the Vite config which is being merged. For example, set `false` if you're merging two `build` options.
314314

315+
Note that `null` and `undefined` values in `overrides` are skipped and not merged. If you need to explicitly clear a value from `defaults`, modify the result of `mergeConfig` directly.
316+
315317
::: tip NOTE
316318
`mergeConfig` accepts only config in object form. If you have a config in callback form, you should call it before passing into `mergeConfig`.
317319

0 commit comments

Comments
 (0)