brillout / vite-plugin-mdx

Vite Plugin for MDX
MIT License
113 stars 36 forks source link

Pre-built transclusion #33

Closed brandonptucker closed 3 years ago

brandonptucker commented 3 years ago

I'm trying to import a .md file inside a .mdx file (https://github.com/brillout/vite-plugin-mdx#pre-built-transclusion). It seems like the .md file is imported properly, but never rendered.

I forked this project and modified the react example to share what I'm trying to do: https://github.com/brandonptucker/vite-plugin-mdx/commit/06cc7b21f367604361ef6be1b598620aa36b55a1

Any help would be greatly appreciated!

aleclarson commented 3 years ago

I think it will work if you remove the semicolon.

https://github.com/brillout/vite-plugin-mdx/blob/e0f7a60aabbcae80fcaa8b12a6d666f2e56dc675/src/viteMdxTransclusion/remarkTransclusion.ts#L7

PR welcome!

brandonptucker commented 3 years ago

Thank you!