1.0.5 • Published 3 years ago
@barmplus/vite-plugin-mdx v1.0.5
Vite Plugin MDX
Getting Started
- Install:
ornpm install @barmplus/vite-plugin-mdx -D
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