diff --git a/package.json b/package.json index 5ff232c72..1fd4246e0 100644 --- a/package.json +++ b/package.json @@ -76,8 +76,8 @@ "stylelint": "^8.1.1", "stylelint-config-standard": "^17.0.0", "transliteration": "^1.6.2", + "vue-antd-md-loader": "^1.0.1", "vue-loader": "^13.0.5", - "vue-markdown-loader": "^2.3.0", "vue-router": "^3.0.1", "vue-template-compiler": "^2.5.13", "webpack": "^3.6.0", diff --git a/webpack.base.config.js b/webpack.base.config.js index 62b9cec91..7218a322c 100644 --- a/webpack.base.config.js +++ b/webpack.base.config.js @@ -5,7 +5,7 @@ const Token = require('markdown-it/lib/token') const cheerio = require('cheerio') const fetch = (str, tag) => { - const $ = cheerio.load(str, { decodeEntities: false }) + const $ = cheerio.load(str, { decodeEntities: false, xmlMode: true }) if (!tag) return str return $(tag).html() @@ -131,8 +131,8 @@ module.exports = { test: /\.md/, use: [ { - loader: 'vue-markdown-loader', - options: Object.assign(md, { wrapper: 'section', preventExtract: true }), + loader: 'vue-antd-md-loader', + options: md, }, ], },