Describe the bug
TypeScript error (2769) when setting the minify build option for async config.
Reproduction
https://github.com/Android789515/vite-minify-error
Steps to reproduce
npm create vite@latest
- Confirm ok to proceed installing create vite if not installed
- Pick React and TypeScript
- Don't use Vite 8
- Don't autostart
cd project
npm i
- Edit
vite.config.ts
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vite.dev/config/
// Make async config
export default defineConfig(async () => ({
plugins: [react()],
build: {
// add minify: terser or esbuild
minify: 'terser',
},
}))
System Info
System:
OS: Linux 6.12 EndeavourOS
CPU: (16) x64 AMD Ryzen 7 9800X3D 8-Core Processor
Memory: 48.31 GB / 60.43 GB
Container: Yes
Shell: 0.110.0 - /usr/bin/nu
Binaries:
Node: 25.6.1 - /usr/bin/node
npm: 11.10.1 - /usr/bin/npm
Deno: 2.6.10 - /usr/bin/deno
Browsers:
Firefox: 147.0.4
Firefox Developer Edition: 147.0.4
npmPackages:
@vitejs/plugin-react: ^5.1.1 => 5.1.4
vite: ^7.3.1 => 7.3.1
Used Package Manager
npm
Logs
No response
Validations
Describe the bug
TypeScript error (2769) when setting the minify build option for async config.
Reproduction
https://github.com/Android789515/vite-minify-error
Steps to reproduce
npm create vite@latestcd projectnpm ivite.config.tsSystem Info
System: OS: Linux 6.12 EndeavourOS CPU: (16) x64 AMD Ryzen 7 9800X3D 8-Core Processor Memory: 48.31 GB / 60.43 GB Container: Yes Shell: 0.110.0 - /usr/bin/nu Binaries: Node: 25.6.1 - /usr/bin/node npm: 11.10.1 - /usr/bin/npm Deno: 2.6.10 - /usr/bin/deno Browsers: Firefox: 147.0.4 Firefox Developer Edition: 147.0.4 npmPackages: @vitejs/plugin-react: ^5.1.1 => 5.1.4 vite: ^7.3.1 => 7.3.1Used Package Manager
npm
Logs
No response
Validations