@barmplus/vite-plugin-mdx
v1.0.5
Published
## Getting Started
Downloads
4
Readme
Vite Plugin MDX
Getting Started
Install:
npm install @barmplus/vite-plugin-mdx -D
or
yarn add @barmplus/vite-plugin-mdx -D
Add the plugin to your
vite.config.js
.// vite.config.js import mdx from '@barmplus/vite-plugin-mdx' const options = { framework: 'react' // react or vue3 } export default { plugins: [mdx(options)] }
You can now write
.mdx
files.// 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