1.0.8 • Published 2 years ago

@socialuni/vite-plugin-md v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@socialuni/vite-plugin-md

this is get markdown string from *.md vite-plugin

install

npm install @socialuni/vite-plugin-md -D

usage

import md from '@socialuni/vite-plugin-md'

// https://vitejs.dev/config/
export default defineConfig({
    plugins: [vue(), md()],
    server: {
        host: "0.0.0.0"
    },
    resolve: {
        alias: {
            '@': fileURLToPath(new URL('./src', import.meta.url))
        }
    }
})

demo

input ./hello.md

# hello world

output ./hello.js

import helloStr from './hello.md'

console.log(helloStr) // hello world