chore(desktop): drop deprecated optimizeDeps.esbuildOptions by MicoinSmith · Pull Request #5738 · marktext/marktext · GitHub
Skip to content

chore(desktop): drop deprecated optimizeDeps.esbuildOptions - #5738

Merged
Jocs merged 2 commits into
marktext:developfrom
MicoinSmith:chore/drop-vite-esbuild-options
Oct 14, 2026
Merged

Jocs merged 2 commits into
marktext:developfrom
MicoinSmith:chore/drop-vite-esbuild-options

Conversation

@MicoinSmith

Copy link
Copy Markdown
Contributor

Summary

Remove the deprecated optimizeDeps.esbuildOptions from
electron.vite.config.ts. Vite 8 pre-bundles with Rolldown and prints a
deprecation warning for this option on every dev/build run.

It cannot simply be swapped for rolldownOptions: { define }: Vite's dep
optimizer omits define from its Rolldown options (tsc rejects it and Rolldown
warns "Expected never"). The existing top-level define.global already covers
pre-bundled dependencies, so the option is simply dropped.

Type of change

  • Bug fix — no functional change
  • Build configuration cleanup

Test plan

  • New tests added (or explain why not needed) — build config only.
  • Manually tested: pnpm run build:unpack completes with no deprecation
    warning.

Notes for reviewers

Pre-bundled deps (pako, pathe) still resolve global via the top-level
define.

Vite 8 pre-bundles with Rolldown and warns that esbuildOptions is
deprecated. The top-level define.global covers pre-bundled deps.
@Jocs

Jocs commented Oct 13, 2026

Copy link
Copy Markdown
Member

@MicoinSmith
MicoinSmith force-pushed the chore/drop-vite-esbuild-options branch from 5556882 to 8a88511 Compare October 13, 2026 10:49
@MicoinSmith

Copy link
Copy Markdown
Contributor Author

@Jocs
Jocs merged commit 8e0f25b into marktext:develop Oct 14, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants