chore: upgrade to Astro 7.0.0-alpha.0 (Rust compiler default + Vite 8)#167
Merged
Conversation
Astro 7 makes the Rust compiler default and bumps Vite to v8. This
upgrades all related integrations to alpha versions pinned exactly,
and bumps Vite plugins to versions with vite ^8 peer dependencies.
- astro 6 → 7.0.0-alpha.0 (exact pin)
- @astrojs/{mdx,react,svelte,vue} → matching alpha versions (exact pin)
- @astrojs/compiler-rs ^0.1.4 → ^0.1.10
- @sveltejs/vite-plugin-svelte 6 → 7
- @vitejs/plugin-react 5 → 6
- @vitejs/plugin-vue / @tailwindcss/vite / vitest patch updates
@astrojs/check is left at 0.9.7 (Astro 7 alpha not yet published);
peer warnings tolerated for now and confirmed lint:astro still works.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Drop experimental.rustCompiler flag (removed in Astro 7; Rust compiler is now the default) - Convert manualChunks from object form to function form (Vite 8 removed the object form; function form remains supported) - Remove the lucide-svelte alias workaround. The original Vite 7 strict ESM resolution issue no longer reproduces under Vite 8; build and Svelte island hydration verified without the alias - Drop the now-unused node:path / node:url imports Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@astrojs/svelte 9 alpha still pins @sveltejs/vite-plugin-svelte ^6.x in its peer dependencies, which conflicts with the vite-plugin-svelte 7 / Vite 8 we need. Set legacy-peer-deps=true so npm install/ci accept the resolution, and regenerate the lockfile so npm ci stays in sync on CI and Cloudflare Pages. Can be reverted once the alpha integrations align their peer deps. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Deploying apg-patterns-examples with
|
| Latest commit: |
8b42095
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d705d70a.apg-patterns-examples.pages.dev |
| Branch Preview URL: | https://upgrade-astro-7-alpha.apg-patterns-examples.pages.dev |
Two side effects from regenerating the lockfile under legacy-peer-deps: - eslint-plugin-react-hooks bumped 7.0.1 → 7.1.1 implicitly, which enables a new "Cannot access refs during render" error rule. Pin to 7.0.1 to keep the lint regression separate from the Astro 7 work. - vue-eslint-parser (peer dep of eslint-plugin-vue) was no longer hoisted automatically. Add it explicitly so npm ci on CI / Cloudflare Pages can resolve it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The @vite-ignore directive was added as a dev-only HMR workaround, but it also tells Vite not to bundle the import. Under Astro 7 + Vite 8 the unbundled URL ./Dialog.vue ends up referenced from the production chunk and the browser receives 404 for /_astro/Dialog.vue, which broke all Vue Dialog E2E tests on CI. Removing the comment lets Vite bundle Dialog.vue normally. Verified locally with npm run build + npm run preview that the dialog page now renders without console errors. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Astro 7.0.0-alpha.0 (release, 2026-04-30) makes the Rust compiler default and bumps Vite to v8. This branch adapts the project to that release and verifies build/test/preview locally so we can decide whether to merge based on Cloudflare Pages / GitHub Pages preview build outcomes.
Plan worked out together with Codex (壁打ち): branch-only validation, exact-pin alpha versions, manualChunks function form, drop the lucide-svelte Vite 7 workaround.
Changes
astro 7.0.0-alpha.0,@astrojs/{mdx,react,svelte,vue}matching alphas@astrojs/compiler-rs ^0.1.10,@sveltejs/vite-plugin-svelte ^7,@vitejs/plugin-react ^6, plus patch updates for@vitejs/plugin-vue,@tailwindcss/vite,vitest,@vitest/*experimental.rustCompiler(flag dropped in Astro 7), convertedmanualChunksfrom object → function form (Vite 8 removed object form), removed thelucide-sveltealias workaround (no longer needed under Vite 8)Local verification
npm run build— 553 pages built (~42s)npm run test:unit— 75 files / 2624+144 tests passed (Vitest + Container API)npm run lint:astro— 0 errors / 0 warnings (kept old@astrojs/check ^0.9.7since no Astro-7-compatible alpha is published yet; works in practice)npm run preview— manually walked checkbox/{react,vue,svelte,astro}, button/{react,vue,svelte,astro}, tabs, toggle-button via PlaywrightTest plan
Known issues (alpha-related, surfaced during validation)
/patterns/checkbox/react/):ReferenceError: $RefreshSig$ is not definedoriginating fromCheckbox.vuewhen transformed by Vite. Production build is unaffected — preview build of the same page renders cleanly. Likely an alpha-stage interaction between@vitejs/plugin-react@6.xand@astrojs/vue@7.0.0-alpha.0. Will revisit once a beta lands./ja/...pages:PatternSearch.tsxcallsgetLocaleFromDocument()inside auseStateinitializer. This returns'en'during SSR (nodocument) and'ja'after hydration — server HTML uses Japanese pattern descriptions while the client tree initializes with English. Verified the implementation hasn't changed since the component was added (commitsff7015b,5617cba); React 19 + Astro 7's stricter hydration likely just surfaces a latent bug. Out of scope for this PR; will file a separate issue.vite-plugin-svelteprintsSupport for vite 8 beta in vite-plugin-svelte is experimentalat startup. Builds and tests pass.Notes for future cleanup
@astrojs/checkships an Astro 7 alpha, drop the peer-warning suppression context and verifylint:astrostill works.manualChunksfunction form is deprecated in Vite 8; long-term migration path is Rolldown'scodeSplitting.groups. Park for now.🤖 Generated with Claude Code