cyco130 / vite-plugin-mdx

MDX plugin for Vite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@cyco130/vite-plugin-mdx

This is a plugin for using MDX in Vite applications.

This plugin requires Vite v3 which is currently in alpha.

Why not use @mdx-js/rollup?

@cyco130/vite-plugin-mdx configures the MDX compiler to keep the JSX in the generated files so that you can use @vitejs/plugin-react or @preact/preset-vite for the JSX transformation. This also enables Fast refresh.

@cyco130/vite-plugin-mdx also comes with a CJS build (in addition to the ESM build) while @mdx-js/rollup is ESM only.

Examples

Credits

Plugin code is heavily based on @mdx-js/rollup.

About

MDX plugin for Vite

License:MIT License


Languages

Language:TypeScript 89.4%Language:Shell 6.1%Language:JavaScript 4.5%