feat: add Astro 6 support to @keystatic/astro#1527
Open
fabian-von-tiedemann wants to merge 1 commit intoThinkmill:mainfrom
Open
feat: add Astro 6 support to @keystatic/astro#1527fabian-von-tiedemann wants to merge 1 commit intoThinkmill:mainfrom
fabian-von-tiedemann wants to merge 1 commit intoThinkmill:mainfrom
Conversation
- Bump peerDependencies astro range from "2 || 3 || 4 || 5" to "2 || 3 || 4 || 5 || 6" - Rename internal/keystatic-page.js → keystatic-page.tsx so Astro 6's SSR build pipeline correctly identifies the file as a React component. In production builds, Astro 6 matches framework renderers by file extension; a bare .js file triggers "NoMatchingRenderer" for client:only="react" components. Renaming to .tsx fixes this. Fixes Thinkmill#1515
|
|
+1 |
|
Eagerly waiting for this. Thanks! |
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 #1515
Two minimal changes to support Astro 6:
Bump
peerDependencies— extend theastrorange from"2 || 3 || 4 || 5"to"2 || 3 || 4 || 5 || 6"so package managers stop reporting unmet peer dependency warnings.Rename
internal/keystatic-page.js→keystatic-page.tsx— In Astro 6's production SSR build pipeline, framework renderers are matched by file extension. Becausekeystatic-astro-page.astroimports from./keystatic-page.jsand usesclient:only="react", Astro 6 throws:Renaming the file to
.tsxlets Astro correctly identify it as a React component. The.astroimport is updated accordingly (./keystatic-page.tsx).This issue does not surface in
astro devbecause Vite's dev server resolves modules more permissively than the production bundle — which is why it only affects deployed/production builds.Testing
Verified fix matches the workaround confirmed working by community members in #1515 (Astro 6.1.2,
@astrojs/netlify, production builds on Vercel/Netlify).