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

1.0.5 • 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

Readme

Keywords

Package Sidebar

Install

DownloadsWeekly Downloads

173

Version

1.0.5

License

MIT

Unpacked Size

27.6 kB

Total Files

17

Last publish

Collaborators

  • yaochang
  • xujiangping