perf(desk): upgrade Vite 4 to 8 for ~4x faster builds - #3545
Conversation
|
Tick the box to add this pull request to the merge queue (same as
|
Confidence Score: 5/5Safe 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 |
| "vite-plugin-pwa": "1.3.0" | ||
| }, | ||
| "resolutions": { | ||
| "cheerio": "1.0.0-rc.12", |
There was a problem hiding this comment.
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.
Upgrades the
deskfrontend 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.jsneeded no changes.Changes
Vite 8 removed the legacy esbuild transform APIs, so the plugins that hook into it have to move together, bumping
vitealone fails withFailed to load transformWithEsbuild: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.6vite-plugin-pwa0.15.01.3.0Second commit removes a duplicate
import LogoFrappeMailinemailConfig.ts(line 8 duplicates line 1). Pre-existing bug ondevelopthat esbuild tolerated, and Rolldown correctly rejects the build can't pass without it.Notes
frappe-uiis unaffected, it already builds against Vite 7 and doesn't touch esbuild's API, so no companion PR needed there.^20.19 || >=22.12. CI lint already runs Node 24.yarn installwarns about unmetworkbox-*peers a Yarn v1 quirk; PWA output generates correctly (104 precache entries,sw.jsemitted).Testing
yarn buildpasses, PWA assets generated as beforeyarn devboots and serves (HTTP 200)vite-plugin-pwacrossed a major, so that's the likeliest spot for a silent regression.