mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-07 14:17:16 +02:00
* feat(v2): composition syntax highlighting & react-live playground * mobile friendly tweak * refactor styling * revert docs
40 lines
589 B
Markdown
40 lines
589 B
Markdown
# `@docusaurus/mdx-loader`
|
|
|
|
Docusaurus webpack loader of [MDX](https://github.com/mdx-js/mdx)
|
|
|
|
## Installation
|
|
|
|
```sh
|
|
yarn add @docusaurus/mdx-loader
|
|
```
|
|
|
|
## Usage
|
|
```js
|
|
|
|
// ...
|
|
module: {
|
|
rules: [
|
|
// ...
|
|
{
|
|
test: /\.mdx?$/,
|
|
use: [
|
|
'babel-loader',
|
|
{
|
|
loader: '@docuaurus/mdx-loader',
|
|
options: {
|
|
// .. See options
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
## Options
|
|
|
|
### `rehypePlugins`
|
|
Array of rehype plugins to manipulate the MDXHAST
|
|
|
|
### `remarkPlugins`
|
|
Array of remark plugins to manipulate the MDXAST
|