fix(deps): pin astro's vite to ^7 (scoped override)#155
Merged
Conversation
Astro 6.1.9 declares 'vite: ^7.3.2' as its dep, but bun was hoisting the root's vite ^8.0.0 (used by apps/ui) into astro's resolution. Vite 8 ships Rolldown, which has incomplete plugin API coverage — PluginContext.generateBundle throws 'Not implemented', crashing the astro docs build intermittently in Deploy Preview CI. Fix: scoped npm-style override 'astro>vite: ^7.3.2' so astro gets its own Vite 7 install while apps/ui keeps Vite 8 + Rolldown. Both builds verified locally: - apps/docs build: 35 pages in 3.97s - apps/ui build: succeeds in 443ms Bun does NOT support nested override syntax (warns and ignores), but DOES accept npm's 'parent>child' arrow form. Verified by inspecting bun.lock: 'astro/vite' resolves to 7.3.2, root 'vite' stays at 8.0.10. Remove this override once astro 7 (which supports vite 8) lands and we upgrade.
Contributor
There was a problem hiding this comment.
Pull request overview
Pins Astro’s internal Vite dependency to the Vite 7 line (while preserving Vite 8 for apps/ui) to prevent intermittent astro build failures caused by Bun hoisting Vite 8/Rolldown into Astro’s dependency graph.
Changes:
- Add a root
package.jsonscoped override (astro>vite) to force Astro to resolve Vite^7.3.2. - Update
bun.lockto reflect the new override and the resulting resolution (astro/vite→7.3.2, rootvitestays on8.0.10). - Minor churn/reorder in
.beads/issues.jsonl.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| package.json | Adds scoped dependency override so Astro always gets Vite 7. |
| bun.lock | Persists the override + resulting dependency graph (Astro uses Vite 7; root uses Vite 8). |
| .beads/issues.jsonl | Reorders/re-adds an existing memory entry (unrelated to dependency fix). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Preview EnvironmentStage:
Deployed via SST to |
Bundle ReportChanges will increase total bundle size by 66 bytes (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: procella-ui-esmAssets Changed:
|
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.
Summary
Fixes the intermittent "Deploy Preview" CI failure where
astro buildcrashes withNot implementedinsidevite/dist/node/chunks/node.js:33831duringPluginContextImpl.generateBundle.Root cause
astro@6.1.9declares"vite": "^7.3.2"as a depapps/ui/package.jsonpins"vite": "^8.0.0"(UI ships on Rolldown vite)PluginContextAPI is incomplete (see rolldown/rolldown#4973, rolldown/rolldown#6634)Fix
Scoped
overridesso astro always gets Vite 7, while apps/ui keeps Vite 8 + Rolldown:Why arrow syntax (not nested)
Bun does not support npm's nested-object override syntax (warns and silently ignores it). Bun does accept the npm
parent>childarrow form. Verified after install:bun.lockresolvesastro/vite→7.3.2while the rootvitestays at8.0.10. UI's@vitejs/plugin-react@6.0.1peer dep on Vite 8 is preserved.Verification
Both builds pass locally:
bun run --cwd apps/docs buildbun run --cwd apps/ui buildCI's Deploy Preview + Bundle Analysis will confirm.
When to remove
Drop this override once we upgrade to astro 7 (which supports Vite 8 natively).
Summary by cubic
Pin
astro’s Vite to^7using a scoped override to stop intermittent docs build crashes in Deploy Preview CI, while keepingapps/uionvite^8.This ensures stable
astro buildruns without changing the UI build.overrides: { "astro>vite": "^7.3.2" }soastro@6.xalways uses Vite 7.vite8 (Rolldown) intoastro, which caused “Not implemented” inPluginContext.generateBundleduringastro build.apps/uistays onvite^8and@vitejs/plugin-react; no behavior change.astro@7(Vite 8 support).Written for commit df7112f. Summary will update on new commits. Review in cubic