I am unable to replicate the "Transform Content section of the documentation. https://mdxjs.com/advanced/transform-content
https://github.com/MatthewCaseres/mdx-reproduction
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

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.
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/mdxdirectly, which includesremark-mdxand supports passingremarkPlugins.What to do, depends on what you want to do!