Skip to content

fix(desktop): cap esbuild at ^0.25.0 so wails dev builds again#4410

Merged
esengine merged 1 commit into
main-v2from
fix/desktop-vite-dev-esbuild
Jun 15, 2026
Merged

fix(desktop): cap esbuild at ^0.25.0 so wails dev builds again#4410
esengine merged 1 commit into
main-v2from
fix/desktop-vite-dev-esbuild

Conversation

@esengine

Copy link
Copy Markdown
Owner

Problem

wails dev for the desktop app cannot start. Vite's dev dependency
pre-bundling fails for every dependency that uses destructuring:

X [ERROR] Transforming destructuring to the configured target environment
("chrome87", "edge88", "es2020", "firefox78", "safari14" + 2 overrides)
is not supported yet
  @tanstack/react-virtual, qrcode.react, @gsap/react, highlight.js, ...

147 errors → the dev build never compiles, so the window never opens.

Root cause

#4323 pinned esbuild to 0.28.1 via overrides in both
desktop/frontend/package.json (npm) and
desktop/frontend/pnpm-workspace.yaml (pnpm) to pick up the patched
release. But vite 6.4.2 depends on esbuild@^0.25.0. With 0.28.1
forced tree-wide, vite hands esbuild its dev ESBUILD_MODULES_TARGET
(es2020, edge88, firefox78, chrome87, safari14 + the
dynamic-import/import-meta supported overrides), and esbuild 0.28
rejects that combination.

The production path (build.target: "es2021") is unaffected, which is
why CI — pnpm --dir frontend build only — stayed green and the
breakage is dev-only.

The security advisory the pin targeted was fixed in 0.25.0, which
vite already enforces, so the 0.28.1 floor was both unnecessary and
breaking here.

Fix

Cap the desktop override at ^0.25.0 (>=0.25.0 <0.26.0):

site/ and workers/ keep 0.28.1 — Astro/Wrangler don't hit the
vite-6 dev path, so their blast radius stays minimal.

package-lock.json is regenerated by npm 11 (reformatting only; verified
no dependency drift beyond esbuild).

Validation (local, origin/main-v2 tip)

  • wails devnow launches ("Compiling application: Done", window opens, hot reload watching)
  • pnpm install --frozen-lockfile
  • pnpm typecheck
  • pnpm test ✓ (tsx runs on esbuild 0.25.12)
  • pnpm build (production) ✓

#4323 pinned esbuild to 0.28.1 (npm overrides + pnpm-workspace overrides)
to pick up the patched release. But vite 6.4.2 depends on esbuild
^0.25.0, and 0.28.1 breaks its dev dependency pre-bundling: every dep
using destructuring fails with "Transforming destructuring to the
configured target environment is not supported yet", so `wails dev`
never starts. The advisory the pin targeted was already fixed in 0.25.0,
which vite enforces anyway.

Cap the override at ^0.25.0 (>=0.25.0 <0.26.0): still patched, matches
vite's own range, and blocks Dependabot from bumping back to 0.28.
Resolves to 0.25.12. site/ and workers/ keep 0.28.1 (Astro/Wrangler are
unaffected by the vite dev path).

package-lock.json is regenerated by npm 11 — reformatting only, no
dependency drift beyond esbuild.
@esengine esengine requested a review from SivanCola as a code owner June 15, 2026 02:08
@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development desktop Wails desktop app (desktop/**) labels Jun 15, 2026
@esengine esengine merged commit b225dd7 into main-v2 Jun 15, 2026
14 checks passed
@esengine esengine deleted the fix/desktop-vite-dev-esbuild branch June 15, 2026 02:18
jxzhealthy added a commit to jxzhealthy/DeepSeek-Reasonix that referenced this pull request Jun 15, 2026
fix(desktop): cap esbuild at ^0.25.0 so `wails dev` builds again (esengine#4410)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

desktop Wails desktop app (desktop/**) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant