docusaurus/packages/docusaurus-mdx-loader
Joshua Chen 7613ecb9ea
refactor: use TS project references instead of running tsc multiple times (#7437)
* refactor: use TS project references instead of running tsc multiple times

* deduplicate

* dedup

* eliminate --project

* add swc config

* add target
2022-05-17 15:21:44 +08:00
..
src chore: enable import/order rule (#7418) 2022-05-14 23:39:50 +08:00
.npmignore refactor: use TS project references instead of running tsc multiple times (#7437) 2022-05-17 15:21:44 +08:00
package.json chore: upgrade dependencies (#7436) 2022-05-17 13:11:20 +08:00
README.md docs(v2): Add READMEs to v2 packages (#4034) 2021-01-14 17:16:26 +01:00
tsconfig.json refactor(types): move non-core, non-public types out of the types package (#7293) 2022-05-03 17:15:48 +08: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.