-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Description
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 projectnpm 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.1Used Package Manager
npm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable