npm / @astrojs/mdx
@astrojs/mdx
What changed in @astrojs/mdx 4 to 8, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-17.
@astrojs/mdx 813 changes
Breaking changes 2
The minimum supported Node.js version is now 22.22.0, aligning with Astro's Node.js support policy and StackBlitz support.
MDX files are now processed by Markdown processors, which must meet the required versions when explicitly configured.
Deprecations 6
A warning is now emitted when this deprecated option is ignored because the configured Markdown processor does not run it.
A warning is added when recmaPlugins is ignored because the configured Markdown processor does not run it.
A warning is now emitted when this deprecated option is ignored because the configured Markdown processor does not run it.
A warning is now emitted when this deprecated option is ignored because the configured Markdown processor does not run it.
A warning is now emitted when this deprecated option is ignored because the configured Markdown processor does not run it.
A warning is added when remarkRehype is ignored because the configured Markdown processor does not run it.
Behavior and default changes 3
YAML parsing now supports merge keys in MDX content.
YAML parsing now supports timestamps and merge keys in MDX, and YAML errors are formatted consistently.
With extendMarkdownConfig false, MDX uses a clean default processor; pass mdx({ processor }) to choose one explicitly.
Fixes and other changes 2
YAML errors are formatted consistently across Astro, Markdown, MDX, and Markdoc.
Prevents installation with incompatible Astro versions and improves the error message to suggest updating astro.
@astrojs/mdx 79 changes
Breaking changes 1
Upgrades to Vite v8, which may affect project build and development behavior.
Deprecations 1
Importing getContainerRenderer() from the package root still works but is deprecated and logs a warning.
New APIs and options 2
Adds a container-renderer entrypoint exporting getContainerRenderer() for MDX integrations.
Sätteri plugins can read and mutate frontmatter programmatically, with the result used as the MDX page's frontmatter.
Fixes and other changes 5
Build errors for wrapped plugin errors now show the correct file location, line and column, and more accurate hints.
Sätteri processor option types now accept all plugin entries supported by Sätteri v0.10.3.
Fixes a bug where the integration emitted React-cased attribute names.
Custom pre components now apply to syntax-highlighted code blocks when using the Sätteri Markdown processor with MDX.
Corrects the dependencies declared in peerDependencies, improving dependency resolution for users installing the package.
@astrojs/mdx 610 changes
Deprecations 7
The top-level option is deprecated; move it into unified({...}) or the preferred plugin processor.
The top-level option is deprecated; move rehype plugins into unified({...}) or the preferred plugin processor.
The top-level option is deprecated; move it into unified({...}) or the preferred plugin processor.
The top-level option is deprecated; move it into unified({...}) or the preferred plugin processor.
The MDX integration option is deprecated; move it onto unified({...}) or the preferred plugin processor.
The MDX integration option is deprecated; move it onto unified({...}) or the preferred plugin processor.
The MDX integration option is deprecated; move it onto unified({...}) or the preferred plugin processor.
New APIs and options 3
Adds Prism syntax highlighting for code blocks in the Sätteri Markdown and MDX processors when markdown.syntaxHighlight is set to 'prism'.
The MDX integration can use a different Markdown processor, allowing Sätteri for Markdown while retaining Unified for MDX.
Adds a configuration option to choose an alternative Markdown processor while keeping unified() as the default.
@astrojs/mdx 56 changes
Breaking changes 3
Temporary support for Node >=20.19.1 was removed because Stackblitz now uses Node 22 by default.
The Astro peer dependency requirement is updated to 6.0.0, affecting compatibility when installing or using this integration.
Markdown heading ID generation was updated, which may change generated heading anchors.
Behavior and default changes 1
The minimum Node.js requirement was changed, including a lower requirement to support StackBlitz until it supports v22.
Fixes and other changes 2
Fixes an issue where the smartypants option was ignored.
Detection of export const components declarations was fixed for projects using the optimize option.
@astrojs/mdx 41 changes
Behavior and default changes 1
The returned object now includes a client hydration entrypoint, enabling client-side interactivity without manually calling container.addClientRenderer().