@shepardliu/vite-plugin-mdx
v0.0.5
Published
A Vite plugin for MDX
Readme
Vite Plugin MDX
Getting Started
Install:
npm install @shepardliu/vite-plugin-mdx -Dor
yarn add @shepardliu/vite-plugin-mdx -DAdd the plugin to your
vite.config.js.// vite.config.js import mdx from '@shepardliu/vite-plugin-mdx' const options = { framework: 'react' // react or vue3 } export default { plugins: [mdx(options)] }You can now write
.mdxfiles.// hello.mdx # Hello MDX & Vite This is a plugin of MDX for vite// App.jsx import React from 'react' import Hello from './hello.mdx' function App() { return ( <div className="App"> <Hello/> </div> ) } export default App
