1.0.5 • Published 3 years ago

@barmplus/vite-plugin-mdx v1.0.5

Weekly downloads
-
License
-
Repository
github
Last release
3 years ago

Vite Plugin MDX

Getting Started

  1. Install:
    npm install @barmplus/vite-plugin-mdx -D
    or
    yarn add @barmplus/vite-plugin-mdx -D
  1. 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)]
    }
  2. 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
1.0.5

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago