✨ Major Changes
-
#10935
ddd8e49Thanks @bluwy! - Refactors the MDX transformation to rely only on the unified pipeline. Babel and esbuild transformations are removed, which should result in faster build times. The refactor requires using Astro v4.8.0 but no other changes are necessary. -
#10935
ddd8e49Thanks @bluwy! - Allows integrations after the MDX integration to updatemarkdown.remarkPluginsandmarkdown.rehypePlugins, and have the plugins work in MDX too.If your integration relies on Astro’s previous behavior that prevents integrations from adding remark/rehype plugins for MDX, you will now need to configure
@astrojs/mdxwithextendMarkdownConfig: falseand explicitly specify anyremarkPluginsandrehypePluginsoptions instead. -
#10935
ddd8e49Thanks @bluwy! - Renames theoptimize.customComponentNamesoption tooptimize.ignoreElementNamesto better reflect its usecase. Its behaviour is not changed and should continue to work as before. -
#10935
ddd8e49Thanks @bluwy! - Replaces the internalremark-images-to-componentplugin withrehype-images-to-componentto let users use additional rehype plugins for images
🐞 Patch Changes
-
#10935
ddd8e49Thanks @bluwy! - Simplifies plain MDX components as hast element nodes to further improve HTML string inlining for theoptimizeoption -
#10935
ddd8e49Thanks @bluwy! - Allows Vite plugins to transform.mdxfiles before the MDX plugin transforms it -
#10935
ddd8e49Thanks @bluwy! - Updates theoptimizeoption to group static sibling nodes as a<Fragment />. This reduces the number of AST nodes and simplifies runtime rendering of MDX pages. -
#10935
ddd8e49Thanks @bluwy! - Tags the MDX component export for quicker component checks while rendering -
#10935
ddd8e49Thanks @bluwy! - Fixesexport const componentskeys detection for theoptimizeoption -
#10935
ddd8e49Thanks @bluwy! - Improvesoptimizehandling for MDX components with attributes and inline MDX components