diff --git a/build/webpack.config.dev.js b/build/webpack.config.dev.js index 1944bc1ec..a70c778a0 100644 --- a/build/webpack.config.dev.js +++ b/build/webpack.config.dev.js @@ -23,6 +23,7 @@ extractExample({ module.exports = { entry: { + vendor: ['packages'], 'vant-docs': './docs/src/index.js', 'vant-examples': './docs/src/examples.js' }, @@ -87,7 +88,18 @@ module.exports = { }, { test: /\.md/, - loader: 'vue-markdown-loader' + loader: 'vue-markdown-loader', + options: { + preventExtract: true, + use: [[require('markdown-it-container'), 'demo']], + preprocess(MarkdownIt, source) { + const styleRegexp = /)<[^<]*)*<\/style>/i; + const scriptRegexp = /)<[^<]*)*<\/script>/i; + MarkdownIt.renderer.rules.table_open = () => + ''; + return source.replace(styleRegexp, '').replace(scriptRegexp, ''); + } + } }, { test: /\.(woff2?|eot|ttf|otf|svg)(\?.*)?$/, @@ -98,23 +110,6 @@ module.exports = { devtool: 'source-map', plugins: [ new ProgressBarPlugin(), - new webpack.LoaderOptionsPlugin({ - minimize: true, - options: { - vueMarkdown: { - preventExtract: true, - use: [ - [require('markdown-it-container'), 'demo'] - ], - preprocess(MarkdownIt, source) { - const styleRegexp = /)<[^<]*)*<\/style>/i; - const scriptRegexp = /)<[^<]*)*<\/script>/i; - MarkdownIt.renderer.rules.table_open = () => '
'; - return source.replace(styleRegexp, '').replace(scriptRegexp, ''); - } - } - } - }), new HtmlWebpackPlugin({ chunks: ['vendor', 'vant-docs'], template: 'docs/src/index.tpl', @@ -132,7 +127,6 @@ module.exports = { minChunks: 2, filename: isProduction ? 'vendor.[hash:8].js' : 'vendor.js' }), - new webpack.HotModuleReplacementPlugin(), new OptimizeCssAssetsPlugin(), new ExtractTextPlugin({ filename: isProduction ? '[name].[hash:8].css' : '[name].css', diff --git a/docs/examples-docs/express-way.md b/docs/examples-docs/express-way.md index 0b0865d7c..0ab6453dd 100644 --- a/docs/examples-docs/express-way.md +++ b/docs/examples-docs/express-way.md @@ -1,7 +1,7 @@ ## ExpressWay 配送方式 diff --git a/docs/examples-docs/icon.md b/docs/examples-docs/icon.md index 480411e19..340d5fc36 100644 --- a/docs/examples-docs/icon.md +++ b/docs/examples-docs/icon.md @@ -32,7 +32,6 @@