Skip to content

perf(desk): upgrade Vite 4 to 8 for ~4x faster builds - #3545

Open
aliraxa29 wants to merge 5 commits into
frappe:developfrom
aliraxa29:refactor/vite8
Open

perf(desk): upgrade Vite 4 to 8 for ~4x faster builds#3545
aliraxa29 wants to merge 5 commits into
frappe:developfrom
aliraxa29:refactor/vite8

Conversation

@aliraxa29

@aliraxa29 aliraxa29 commented Jul 13, 2026

Copy link
Copy Markdown

Upgrades the desk frontend from Vite 4 to Vite 8 (Rolldown + Oxc under the hood). Production build drops from 1m 59s to 27.6s, roughly 4x faster. Dev server is ready in 1.77s. vite.config.js needed no changes.

Changes

Vite 8 removed the legacy esbuild transform APIs, so the plugins that hook into it have to move together, bumping vite alone fails with Failed to load transformWithEsbuild:

Package From To
vite ^4.4.9 ^8.1.4
@vitejs/plugin-vue ^4.2.3 ^6.0.7
@vitejs/plugin-vue-jsx ^3.0.1 ^5.1.6
vite-plugin-pwa 0.15.0 1.3.0

Second commit removes a duplicate import LogoFrappeMail in emailConfig.ts (line 8 duplicates line 1). Pre-existing bug on develop that esbuild tolerated, and Rolldown correctly rejects the build can't pass without it.

Notes

  • frappe-ui is unaffected, it already builds against Vite 7 and doesn't touch esbuild's API, so no companion PR needed there.
  • Vite 8 requires Node ^20.19 || >=22.12. CI lint already runs Node 24.
  • yarn install warns about unmet workbox-* peers a Yarn v1 quirk; PWA output generates correctly (104 precache entries, sw.js emitted).

Testing

  • yarn build passes, PWA assets generated as before
  • yarn dev boots and serves (HTTP 200)
  • Service worker / offline behaviour not yet verified by hand vite-plugin-pwa crossed a major, so that's the likeliest spot for a silent regression.

@aliraxa29 aliraxa29 changed the title perf(desk): upgrade Vite 4 → 8 for ~4x faster builds perf(desk): upgrade Vite 4 to 8 for ~4x faster builds Jul 13, 2026
@mergify

mergify Bot commented Jul 13, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@greptile-apps

greptile-apps Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

Safe to merge; all code changes are correct and the build toolchain upgrade is well-scoped.

The diff is mechanical: four coordinated plugin bumps in package.json, a lockfile refresh, and removal of a provably duplicate import. No application logic changed, and the vite.config.js options in use are all present in vite-plugin-pwa 1.x without rename or removal.

Files Needing Attention: No files require special attention.

Reviews (3): Last reviewed commit: "Merge branch 'develop' into refactor/vit..." | Re-trigger Greptile

Comment thread desk/package.json
"vite-plugin-pwa": "1.3.0"
},
"resolutions": {
"cheerio": "1.0.0-rc.12",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Unverified PWA/service worker behaviour after major bump

vite-plugin-pwa 0.15 → 1.3 is a multi-major jump; the PR itself marks offline/service-worker verification as unchecked. The workbox config shape changed across these majors (e.g., generateSW strategy options, injectManifest paths, and registerType defaults), so a silent regression in precaching or SW registration is plausible in production even if sw.js is emitted during build.

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.

1 participant