📦 markdown-loader built on vuepress for webpack using marked.
npm install markdown-vuepress-loader -D
- Vue-cli 3.0+
// vue.config.js
module.exports = {
// ...
chainWebpack: config => {
config.module
.rule('markdown')
.test(/\.md$/)
.use('vue-loader')
.loader('vue-loader')
.options({
compilerOptions: {
preserveWhitespace: false
}
})
.end()
.use('markdown-loader')
.loader('markdown-vuepress-loader')
// .options({ markdown })
}
}
// main.js
import 'markdown-vuepress-loader/lib/style.css'