chore: upgrade rehype-katex with ESM support, update docs (#6320)

* chore: upgrade rehype-katex to latest version with ESM support and update the docs

* Update documentation to reflect ESM upgrade is currently optional

* rewording

* final tweaks

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
This commit is contained in:
Pranab Das 2022-01-14 09:06:10 +08:00 committed by GitHub
parent afe7464306
commit 4ebb1ca8c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 273 additions and 21 deletions

View file

@ -49,7 +49,7 @@ npm install --save remark-math@3 rehype-katex@4
:::note
There's recently a trend in the Remark/Rehype ecosystem to migrate to ES Modules, which Docusaurus doesn't support yet. Please make sure your installed plugin version is CommonJS-compatible before we officially support ESM.
There's recently a trend in the Remark/Rehype ecosystem to migrate to ES Modules, a new JavaScript module system, which Docusaurus doesn't support yet. Please make sure your installed plugin version is CommonJS-compatible before we officially support ESM. Alternatively, you can read about using dynamic `import()` as a workaround in the tutorial of installing [`rehype-katex`](./markdown-features-math-equations.mdx#upgrading-rehype-katex-beyond-recommended-version).
:::