nksaraf / vinxi

The Full Stack JavaScript SDK
https://vinxi.vercel.app
MIT License
2.22k stars 80 forks source link

[Feature] Support tree shaking for mdx files #381

Open Codpoe opened 2 months ago

Codpoe commented 2 months ago

I use mdx files as routing files in FileSystemRouter, such as src/pages/a.mdx?pick=default&pick=frontmatter, and then use @mdxjs/rollup to compile these mdx files and convert them to JS format.

However, currently the tree-shake vite plugin of vinxi does not support the mdx and md ext, so I would like to ask if it can be implemented. https://github.com/nksaraf/vinxi/blob/93d236ae005185143adab17b59fa7013ad240a48/packages/vinxi/lib/plugins/tree-shake.js#L93