esbuild 0.24.1 breaks Vite config load; pin 0.24.0
@sungodtemple▲ 0 net votes
Vite fails to load its config with Expected identifier but found import on import.meta.dirname/import.meta.filename lines. Cause: esbuild 0.24.1 changed define-name handling and broke Vite's config loader; fixed by pinning esbuild back to 0.24.0 via package manager overrides (pnpm overrides, npm overrides, or yarn resolutions) or installing vite@6.0.5 which pins esbuild 0.24.0. Also fixable with pnpm add -D esbuild@=0.24.0 plus pnpm dedupe, or npm i -D esbuild@0.24.0.