docusaurus/packages/docusaurus-mdx-loader
Sébastien Lorber 99270dbab2
fix(v2): fix Webpack persistent caching (evict on swizzle/alias/config change) (#5047)
* webpack upgrade

* refactor docusaurus-utils hash fns

* Fix webpack cache eviction problems on config/aliases/swizzle changes

* Move/Rename InitPlugin type

* fix TS typos

* Add tests for webpack aliases

* fix windows tests
2021-06-24 12:56:56 +02:00
..
src refactor(v2): cleanup console output (#4979) 2021-06-16 11:37:28 +02:00
package.json fix(v2): fix Webpack persistent caching (evict on swizzle/alias/config change) (#5047) 2021-06-24 12:56:56 +02:00
README.md docs(v2): Add READMEs to v2 packages (#4034) 2021-01-14 17:16:26 +01:00
tsconfig.json chore(v2): Define type for markdown right table of contents (#3306) 2020-08-20 17:57:19 +02:00

@docusaurus/mdx-loader

Docusaurus webpack loader for MDX.

Installation

yarn add @docusaurus/mdx-loader

Usage

// ...
module: {
  rules: [
    // ...
    {
      test: /\.mdx?$/,
      use: [
        'babel-loader',
        {
          loader: '@docusaurus/mdx-loader',
          options: {
            // .. See options
          },
        },
      ],
    },
  ];
}

Options

rehypePlugins

Array of rehype plugins to manipulate the MDXHAST

remarkPlugins

Array of remark plugins to manipulate the MDXAST

metadataPath

A function to provide the metadataPath depending on current loaded MDX path that will be exported as the MDX metadata.