TL;DR: Docusaurus supports remark and rehype plugins, but not recma plugins.
Have you read the Contributing Guidelines on issues?
Prerequisites
Description
I'm working on an example showing how to use Code Hike v1 + Docusaurus, but Docusaurus is missing the option to pass recma plugins that Code Hike needs.
Reproducible demo
code-hike/examples#8
Actual behavior
The MDXOptions from @docusaurus/mdx-loader:
export type MDXOptions = {
admonitions: boolean | Partial<AdmonitionOptions>;
remarkPlugins: MDXPlugin[];
rehypePlugins: MDXPlugin[];
beforeDefaultRemarkPlugins: MDXPlugin[];
beforeDefaultRehypePlugins: MDXPlugin[];
};
Expected behavior
export type MDXOptions = {
admonitions: boolean | Partial<AdmonitionOptions>;
remarkPlugins: MDXPlugin[];
rehypePlugins: MDXPlugin[];
recmaPlugins: MDXPlugin[]; // <-- code hike needs this
beforeDefaultRemarkPlugins: MDXPlugin[];
beforeDefaultRehypePlugins: MDXPlugin[];
};
recmaPlugins is already supported by the ProcessorOptions from @mdx-js/mdx v3.0.0 that @docusaurus/mdx-loader is using.
Your environment
- Docusaurus version used: 3.4.0
TL;DR: Docusaurus supports remark and rehype plugins, but not recma plugins.
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clearoryarn clearcommand.rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages.Description
I'm working on an example showing how to use Code Hike v1 + Docusaurus, but Docusaurus is missing the option to pass recma plugins that Code Hike needs.
Reproducible demo
code-hike/examples#8
Actual behavior
The
MDXOptionsfrom@docusaurus/mdx-loader:Expected behavior
recmaPluginsis already supported by theProcessorOptionsfrom@mdx-js/mdxv3.0.0 that@docusaurus/mdx-loaderis using.Your environment