You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(astro): resolve v0.1.1 blockers caught by kychon.com migration
Fixes four issues filed during the kychon-private marketing-site validation:
kychee-com/run402-private#396 — Image.astro shipped from src/ couldn't resolve its sibling JS imports (./picture-builder.js etc. only existed in dist/). Now copied into dist/ at build time; exports map updated to point at dist/Image.astro.
kychee-com/run402-private#397 — Vite transform() ran AFTER Astro's compiler had already turned <Image src='...'> into a $$createComponent JS call, so the source-byte regex matched zero <Image tags and the rewrite was a no-op. Switched to a load(id) hook for .astro files, which runs BEFORE Astro's compile, so the absolute-path rewrite lands in the source Astro then compiles. The transform path is removed entirely. .tsx/.jsx/.mdx/.md files no longer get source-rewritten — that's a documented v0.1.2 limitation; a future v0.2 will pivot to an import-based pattern (import hero from './hero.jpg') that sidesteps the source-rewrite question entirely.
kychee-com/run402-private#399 — Named re-export of <Image> from dist/index.js added so 'import { Image } from "@run402/astro"' works (the form most users will try first, matching React/Next conventions). The subpath form 'import Image from "@run402/astro/Image.astro"' continues to work. README updated to lead with the named form.
kychee-com/run402-private#398 is doc-only: the kychon migration brief told consumers to pin @run402/sdk@^2.4, which isn't published yet. Briefs have been updated separately.
0 commit comments