feat: add Astro 6 support to @keystatic/astro#1527
feat: add Astro 6 support to @keystatic/astro#1527fabian-von-tiedemann wants to merge 2 commits into
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! |
|
Bump! |
|
+1 Looking forward for this |
|
I'm unable to reproduce the |
|
+1 |
|
Since no reproduction of the |
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).