Mdx: `remark-mdx` does not work with `remark@13`

Created on 18 Nov 2020  路  4Comments  路  Source: mdx-js/mdx

Subject of the issue

I am unable to replicate the "Transform Content section of the documentation. https://mdxjs.com/advanced/transform-content

Your environment

  • Windows 10
  • see package.json in repo
  • node v12.18.2

Steps to reproduce

https://github.com/MatthewCaseres/mdx-reproduction

Expected behaviour

I was trying to follow the example here: https://mdxjs.com/advanced/transform-content. I was expecting there to exist a leaf of type import as is shown in the docs

Actual behaviour

image

鉀碉笍 statureleased 馃摝 aredeps 馃 typenhancement 馃 semvemajor

Most helpful comment

Thanks for the reproduction, @MatthewCaseres!

remark@13 does not work with remark-mdx yet. You can either downgrade to use remark@12 for now. Or you can use @mdx-js/mdx directly, which includes remark-mdx and supports passing remarkPlugins.
What to do, depends on what you want to do!

All 4 comments

Thanks for the reproduction, @MatthewCaseres!

remark@13 does not work with remark-mdx yet. You can either downgrade to use remark@12 for now. Or you can use @mdx-js/mdx directly, which includes remark-mdx and supports passing remarkPlugins.
What to do, depends on what you want to do!

Thanks! I'm trying to build a plugin and it seems like I can iterate and check my work faster with a node script. In my current nextjs project I have to stop and restart the server to rebuild the MDXAST and I can't output the transformed stuff to a file for inspection.

I might only need the markdown nodes (I'm modifying headers), I was just surprised I couldn't reproduce the docs. Thanks for the speedy reply!

A node script can also use mdx-js/mdx!

Hi all! I鈥檓 going to close this as it landed on the main, the (now default) branch we鈥檙e using to gear up to the MDX@2 release.

The reason is so that it鈥檚 more clear which issues still need to be solved already and don鈥檛 require further work.

Expect another next release soonish, which might include it, or maybe it鈥檚 already released as a beta!

For more info, see https://github.com/mdx-js/mdx/issues/1041.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

johno picture johno  路  3Comments

waterfoul picture waterfoul  路  3Comments

johno picture johno  路  4Comments

egoist picture egoist  路  5Comments

ludwigfrank picture ludwigfrank  路  3Comments