Major Changes
-
#10935
ddd8e49
Thanks @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
ddd8e49
Thanks @bluwy! - Allows integrations after the MDX integration to updatemarkdown.remarkPlugins
andmarkdown.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/mdx
withextendMarkdownConfig: false
and explicitly specify anyremarkPlugins
andrehypePlugins
options instead. -
#10935
ddd8e49
Thanks @bluwy! - Renames theoptimize.customComponentNames
option tooptimize.ignoreElementNames
to better reflect its usecase. Its behaviour is not changed and should continue to work as before. -
#10935
ddd8e49
Thanks @bluwy! - Replaces the internalremark-images-to-component
plugin withrehype-images-to-component
to let users use additional rehype plugins for images
Patch Changes
-
#10935
ddd8e49
Thanks @bluwy! - Simplifies plain MDX components as hast element nodes to further improve HTML string inlining for theoptimize
option -
#10935
ddd8e49
Thanks @bluwy! - Allows Vite plugins to transform.mdx
files before the MDX plugin transforms it -
#10935
ddd8e49
Thanks @bluwy! - Updates theoptimize
option to group static sibling nodes as a<Fragment />
. This reduces the number of AST nodes and simplifies runtime rendering of MDX pages. -
#10935
ddd8e49
Thanks @bluwy! - Tags the MDX component export for quicker component checks while rendering -
#10935
ddd8e49
Thanks @bluwy! - Fixesexport const components
keys detection for theoptimize
option -
#10935
ddd8e49
Thanks @bluwy! - Improvesoptimize
handling for MDX components with attributes and inline MDX components