Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(types): narrow down the return type of
defineConfig
Fixes compatibility with `mergeConfig`, as reported in vuejs/create-vue#313 Before the change, `defineConfig` would return `UserConfigExport`, which is a union type. This would cause `mergeConfig` to fail, as it doesn't accept the `UserConfigFn` type in the union. (vitejs#13135) After the change, `defineConfig` returns the same type that it receives, so it would exclude `UserConfigFn` from the return type whenever possible.
- Loading branch information