1.0.7 • Published 2 years ago
vite-plugin-md-string v1.0.7
vite-plugin-md-string
this is get markdown string from *.md vite-plugin
install
npm install vite-plugin-md-string -D
usage
import mdString from 'vite-plugin-md-string'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue(), mdString()],
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