Objective
Investigate and plan the migration from the deprecated esbuild config field to the native Vite 8 oxc configuration in electron.vite.config.ts.
Context
Vite 8 introduces a native oxc configuration namespace as the replacement for the esbuild field, which is deprecated. The project currently does not use any esbuild options, so there is no immediate breakage, but future configuration needs (for example define, jsxInject) should use the oxc.* path.
Scope
- Audit the current
electron.vite.config.ts for any esbuild field usage.
- Research the Vite 8
oxc configuration API and map any future esbuild options to their oxc equivalents.
- Document the migration path and recommended configuration patterns in
docs/vite-config.md or similar.
- If the project adds JS transformation options (define, jsxInject, targets, etc.), implement them under
oxc.* rather than esbuild.*.
- Add a deprecation warning or lint rule that flags new
esbuild.* usage in the config.
Rationale
The project does not currently use esbuild options, so there is no urgency. However, preparing the migration path now avoids a breaking-change surprise when Vite removes the esbuild compat layer in a future major release.
Benefits
- Proactively prepares the configuration for the removal of the
esbuild compat layer.
- Reduces the risk of a breaking change on the next Vite major update.
- Provides clear guidance for contributors adding transformation options in the future.
Definition of Done
Milestone
1.0 Stabilize MVP
Objective
Investigate and plan the migration from the deprecated
esbuildconfig field to the native Vite 8oxcconfiguration inelectron.vite.config.ts.Context
Vite 8 introduces a native
oxcconfiguration namespace as the replacement for theesbuildfield, which is deprecated. The project currently does not use anyesbuildoptions, so there is no immediate breakage, but future configuration needs (for exampledefine,jsxInject) should use theoxc.*path.Scope
electron.vite.config.tsfor anyesbuildfield usage.oxcconfiguration API and map any futureesbuildoptions to theiroxcequivalents.docs/vite-config.mdor similar.oxc.*rather thanesbuild.*.esbuild.*usage in the config.Rationale
The project does not currently use
esbuildoptions, so there is no urgency. However, preparing the migration path now avoids a breaking-change surprise when Vite removes theesbuildcompat layer in a future major release.Benefits
esbuildcompat layer.Definition of Done
esbuildfield usage inelectron.vite.config.ts.oxcequivalents documented.oxc.*instead ofesbuild.*.esbuild.*usage.Milestone
1.0 Stabilize MVP