vite-plugin-md-san
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

vite-plugin-md-san

Import markdown as a ES Module which content could be:

  • raw
  • HTML
  • San Component(including markdown code block preview rendered by San)

Install

npm install vite-plugin-md-san
import {defineConfig} from 'vite'
import mdSan from 'vite-plugin-md-san'

const template = fs.readFileSync(
    path.resolve(__dirname, 'xxx/preview.template'),
    {encoding: 'utf-8'}
);

// https://vitejs.dev/config/
export default defineConfig({
    plugins: [
        mdSan({
            export: 'component', // 'html' | 'component' | 'raw'
            template
        })
    ]
});

Inspired By

/vite-plugin-md-san/

    Package Sidebar

    Install

    npm i vite-plugin-md-san

    Weekly Downloads

    207

    Version

    1.0.6

    License

    MIT

    Unpacked Size

    27.5 kB

    Total Files

    17

    Last publish

    Collaborators

    • yaochang
    • xujiangping