#18036f4444eb Thanks @astro-factory! - Fixes an incompatibility where @astrojs/mdx v8 could be installed with astro versions that bundle an older @astrojs/markdown-satteri lacking MDX support. Also improves the error message when the processor is too old to suggest updating astro itself.
‘@astrojs/mdx’ is still required to add MDX support to your project. However, it now delegates the MDX files processing to Markdown processors.
What should I do?
If you haven’t explicitly installed a Markdown processor, you don’t need to do anything.
Otherwise, ensure that your configured Markdown processor uses the following version:
@astrojs/markdown-satteri 0.4.0 or later if you use satteri()
@astrojs/markdown-remark 7.3.0 or later if you use unified()
🐞 Patch Changes
#17262f8e9458 Thanks @Princesseuh! - Fixes .mdx files still using markdown.processor when extendMarkdownConfig is false. They now use a clean default processor instead; pass mdx({ processor }) to choose one explicitly.
#17262f8e9458 Thanks @Princesseuh! - Adds a warning when the deprecated remarkPlugins, rehypePlugins, recmaPlugins and remarkRehype options are ignored because your Markdown processor does not run them. They still apply when your processor is unified(), and were previously dropped silently otherwise.
#17757660991c Thanks @astro-factory! - Fixes build errors showing wrong file location, missing line:col, and misleading hints when a plugin error (e.g. from MDX) is wrapped by Vite’s build error
#177660762a83 Thanks @HiDeoo! - Fixes Sätteri processor option types to accept all plugin entries supported by Sätteri v0.10.3.
#1734164b0d66 Thanks @Princesseuh! - Fixes custom pre components not applying to syntax-highlighted code blocks when using the Sätteri Markdown processor with MDX.
A new container-renderer entrypoint exporting getContainerRenderer() has been added to the following integrations: React, Preact, Svelte, SolidJS, Vue, and MDX. This prevents bundlers from trying to bundle unrelated exports from the package root when only the Container API is used.
If you are using the Container API, update your import statements to use the new entrypoint. The following example updates the getContainerRenderer() import for React:
import { getContainerRenderer } from '@astrojs/react';
import { getContainerRenderer } from '@astrojs/react/container-renderer';
Importing getContainerRenderer() from the package root still works, but is now deprecated and logs a warning.
A new container-renderer entrypoint exporting getContainerRenderer() has been added to the following integrations: React, Preact, Svelte, SolidJS, Vue, and MDX. This prevents bundlers from trying to bundle unrelated exports from the package root when only the Container API is used.
If you are using the Container API, update your import statements to use the new entrypoint. The following example updates the getContainerRenderer() import for React:
import { getContainerRenderer } from '@astrojs/react';
import { getContainerRenderer } from '@astrojs/react/container-renderer';
Importing getContainerRenderer() from the package root still works, but is now deprecated and logs a warning.
#169694a31f90 Thanks @Princesseuh! - Adds support for Prism syntax highlighting to the Sätteri Markdown and MDX processors. Setting markdown.syntaxHighlight to 'prism' now highlights your code blocks with Prism.
#169694a31f90 Thanks @Princesseuh! - Adds support for Prism syntax highlighting to the Sätteri Markdown and MDX processors. Setting markdown.syntaxHighlight to 'prism' now highlights your code blocks with Prism.
#16848f732f3c Thanks @Princesseuh! - Adds a new markdown.processor configuration option, allowing you to choose an alternative Markdown processor.
Websites with many Markdown/MDX files tend to be slow to build because the unified ecosystem (e.g., remark, rehype) is slow to process. This feature introduces the ability to replace this part of the build pipeline with another processor.
The default processor is unified(). This means that existing configurations remain unchanged and your remark/rehype plugins continue to work.
In addition to this new configuration option, Astro provides a new alternative processor based on Rust: Sätteri. You can choose to use it now by installing @astrojs/markdown-satteri, importing the satteri() processor, and adapting your existing configuration:
This processor does not support the remark and rehype plugins. This means you may need to convert them to MDAST or HAST plugins to retain your current functionality.
The existing top-level markdown.remarkPlugins, markdown.rehypePlugins, markdown.remarkRehype, markdown.gfm, and markdown.smartypants options still work, but are now deprecated and will be removed in a future major update. The matching remarkPlugins, rehypePlugins, and remarkRehype options on the MDX integration are also deprecated for the same reason. To anticipate their removal, move them onto unified({...}) (or your preferred plugin processor) :
astro.config.mjs
import { defineConfig } from 'astro/config';
import remarkToc from 'remark-toc';
import rehypeSlug from 'rehype-slug';
import { unified } from '@astrojs/markdown-remark';
Note that the recmaPlugins option is not supported when using Sätteri as your MDX processor. If you would like to use Sätteri for Markdown files, but still use Unified for MDX, you can pass a different Markdown processor to the MDX integration: