Docusaurus webpack loader for MDX.
yarn add @docusaurus/mdx-loader
// ...
module: {
rules: [
// ...
{
test: /\.mdx?$/,
use: [
{
loader: '@docusaurus/mdx-loader',
options: {
// .. See options
},
},
],
},
];
}
Array of rehype plugins to manipulate the MDXHAST
Array of remark plugins to manipulate the MDXAST
A function to provide the metadataPath depending on current loaded MDX path that will be exported as the MDX metadata.
The global Docusaurus Markdown config (config.markdown
), that plugin authors should forward:
const loader = {
loader: require.resolve('@docusaurus/mdx-loader'),
options: {
markdownConfig: siteConfig.markdown,
},
};