Skip to content

fix: build per-version Vite stats through the vite-plus toolchain#185

Merged
Boshen merged 1 commit into
mainfrom
fix-vite-version-builds
Jun 7, 2026
Merged

fix: build per-version Vite stats through the vite-plus toolchain#185
Boshen merged 1 commit into
mainfrom
fix-vite-version-builds

Conversation

@Boshen

@Boshen Boshen commented Jun 7, 2026

Copy link
Copy Markdown
Member

Problem

tools/override-vite.mjs (run by the Update Vite Stats workflow via vp run generate) was still written for the old plain-Vite setup and no longer builds anything after the vite-plus migration in #183:

  • It pinned the Vite version by writing devDependencies.vite in apps/dashboard/package.json, but the dashboard now depends on vite-plus. The actual vite package is catalog-aliased and resolved through the overrides entry in pnpm-workspace.yaml.
  • It built with ./node_modules/vite/bin/vite.js build, which no longer exists — builds now go through vp build.
  • It shelled out to pnpm install directly instead of vp install.

Fix

  • Pin the target Vite version through the pnpm overrides entry in pnpm-workspace.yaml — the supported way to make vite-plus resolve a specific Vite release.
  • Install with vp install and build with vp build (in apps/dashboard).
  • Snapshot and restore pnpm-workspace.yaml (plus a final vp install) so the stats run leaves the repo clean.
  • Hoist getFilesRecursively to module scope to clear a lint warning.

Verification

Validated the full pipeline locally by overriding to a real vite@7.1.12 (no stable Vite 8 exists yet): vp install resolved real vite@7.1.12 and vp build produced a dist successfully. vp check passes (0 errors).

The stats generator was still written for the old plain-Vite setup and
no longer worked after the vite-plus migration:

- It set devDependencies.vite in apps/dashboard/package.json, but the
  dashboard depends on vite-plus and the Vite version is resolved via the
  `overrides` entry in pnpm-workspace.yaml.
- It built with ./node_modules/vite/bin/vite.js, which no longer exists.
- It shelled out to pnpm directly instead of vp.

Pin the target Vite version through the pnpm `overrides` entry, install
with `vp install`, and build with `vp build`. Restore pnpm-workspace.yaml
afterward. Also hoist getFilesRecursively to module scope to clear a lint
warning.
@Boshen Boshen merged commit 600bc95 into main Jun 7, 2026
5 checks passed
@Boshen Boshen deleted the fix-vite-version-builds branch June 7, 2026 04:16
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