I tried to update my blog to Astro 6.0 and also update my RSS to encode content. I previously held off on this as I use MDX files and didn't think I could reasonably render this content. I learned about the experimental_AstroContainer and saw that it might now be possible. I upgraded to Astro 6.0 and implemented a new RSS endpoint to support MDX with astro containers and both MDX and React renderers.
The Problem
The RSS feed generation works when I run astro dev, but astro build fails when building server entrypoints.
After some debugging, I have found that this import is the cause of the error:
import { getContainerRenderer as getReactContainerRenderer } from "@astrojs/react";
- If I remove the react container renderer and include the import statement, the build fails.
- If I remove the react container renderer and import statement, the build succeeds.
- When I investigate the
@astrojs/reactand@astrojs/mdxpackages I don't see any major difference in how thegetContainerRendererfunction is exported.
The error
[commonjs--resolver] Missing "./internal" specifier in "vite" package