Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/liuyunhe/vite-plugin-mdx
https://github.com/liuyunhe/vite-plugin-mdx
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/liuyunhe/vite-plugin-mdx
- Owner: liuyunhe
- Created: 2024-11-18T03:39:00.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-18T03:40:59.000Z (2 months ago)
- Last Synced: 2024-11-18T04:36:21.805Z (2 months ago)
- Language: TypeScript
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```