Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

vite-plugin-md-san

yaochang1.7kMIT1.0.6TypeScript support: included

Import markdown as a ES Module which content could be: - raw - HTML - San Component(including markdown code block preview rendered by San)

vite, san, markdown, md, doc

readme

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