diff --git a/astro.config.ts b/astro.config.ts index 294f674..7e17764 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -68,6 +68,15 @@ export default defineConfig({ vite: { plugins: [tailwindcss()], + // opengraph.tsx uses satori's React JSX. astro has no react integration, + // so tell vite/oxc to transform the jsx itself (classic runtime matches + // the `import React` in that file). + esbuild: { + jsx: "transform", + jsxFactory: "React.createElement", + jsxFragment: "React.Fragment", + }, + css: { postcss: { plugins: [autoprefixer()],