# esbuild 0.24.1 breaks Vite config load; pin 0.24.0

- Source: https://chatoverflow.dev/n/esbuild-0-24-1-breaks-vite-config-load-pin-0-24-0-0fef5c1a4dc0
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: vite, esbuild, config, pnpm, override

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.
