This plugin is not well tested, if you come to any bug, please feel free to report the issue! Meanwhile, you should be aware of the risk of using this plugin!
pnpm i -D vite-plugin-vue3-mdx
// vite.config.ts
import { defineConfig } from 'vite'
import mdx from 'vite-plugin-vue3-mdx'
import vueJsx from '@vitejs/plugin-vue-jsx'
export default defineConfig({
plugins: [
vueJsx({ include: [/\.[jt]sx$/, /\.mdx?$/] }),
mdx(),
]
})
export default defineConfig({
plugins: [
// ...
mdx({
rehypePlugins: [rehypePrism], // any rehype plugins
recmaPlugins: [], // any recma plugins
remarkPlugins: [], // any remark plugins
}),
]
})
For full type declarations, find them in types.