https://github.com/liuyunhe/vite-plugin-mdx
A Vite plugin for MDX,support VUE3 and REACT
https://github.com/liuyunhe/vite-plugin-mdx
good-first-issue mdx reactjs up-for-grabs vite-plugin vue3
Last synced: 3 months ago
JSON representation
A Vite plugin for MDX,support VUE3 and REACT
- Host: GitHub
- URL: https://github.com/liuyunhe/vite-plugin-mdx
- Owner: liuyunhe
- License: mit
- Created: 2024-11-18T03:39:00.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-12-03T02:01:45.000Z (10 months ago)
- Last Synced: 2025-05-26T14:19:19.184Z (4 months ago)
- Topics: good-first-issue, mdx, reactjs, up-for-grabs, vite-plugin, vue3
- Language: TypeScript
- Homepage:
- Size: 155 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Vite Plugin MDX
## Getting Started
1. Install:
```
npm install @shepardliu/vite-plugin-mdx -D
```
or
```
yarn add @shepardliu/vite-plugin-mdx -D
```2. Add the plugin to your `vite.config.js`.
```js
// vite.config.jsimport mdx from '@shepardliu/vite-plugin-mdx'
const options = {
framework: 'react' // react or vue3
}
export default {
plugins: [mdx(options)]
}
```3. You can now write `.mdx` files.
```mdx-js
// hello.mdx
# Hello MDX & ViteThis is a plugin of MDX for vite
```
```javascript
// App.jsx
import React from 'react'import Hello from './hello.mdx'
function App() {
return (
)
}export default App
```