fix: build per-version Vite stats through the vite-plus toolchain#185
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
tools/override-vite.mjs(run by theUpdate Vite Statsworkflow viavp run generate) was still written for the old plain-Vite setup and no longer builds anything after the vite-plus migration in #183:devDependencies.viteinapps/dashboard/package.json, but the dashboard now depends onvite-plus. The actualvitepackage is catalog-aliased and resolved through theoverridesentry inpnpm-workspace.yaml../node_modules/vite/bin/vite.js build, which no longer exists — builds now go throughvp build.pnpm installdirectly instead ofvp install.Fix
overridesentry inpnpm-workspace.yaml— the supported way to make vite-plus resolve a specific Vite release.vp installand build withvp build(inapps/dashboard).pnpm-workspace.yaml(plus a finalvp install) so the stats run leaves the repo clean.getFilesRecursivelyto 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 installresolved realvite@7.1.12andvp buildproduced a dist successfully.vp checkpasses (0 errors).