mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 07:37:19 +02:00
docs: add heads up for Prettier users (#9471)
* docs: add a note on the use of Prettier for MDX * docs: add guides for Prettier users migrating to v3 * Update website/docs/guides/markdown-features/markdown-features-react.mdx Co-authored-by: Joshua Chen <sidachen2003@gmail.com> * docs: Update MDX version * Update website/docs/migration/v3.mdx * Update v3.mdx --------- Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
This commit is contained in:
parent
8dc24b6a98
commit
6cc29fac01
2 changed files with 21 additions and 0 deletions
|
@ -25,6 +25,12 @@ Use the **[MDX playground](https://mdxjs.com/playground/)** to debug them and ma
|
|||
|
||||
:::
|
||||
|
||||
:::info
|
||||
|
||||
Prettier, the most popular formatter, [supports only the legacy MDX v1](https://github.com/prettier/prettier/issues/12209). If you get an unintentional formatting result, you may want to add `{/* prettier-ignore */}` before the problematic area, or add `*.mdx` to your `.prettierignore`, until Prettier has proper support for MDX v3. [One of the main authors of MDX recommends `remark-cli` with `remark-mdx`](https://github.com/orgs/mdx-js/discussions/2067).
|
||||
|
||||
:::
|
||||
|
||||
### Exporting components {#exporting-components}
|
||||
|
||||
To define any custom component within an MDX file, you have to export it: only paragraphs that start with `export` will be parsed as components instead of prose.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue