From d7b0ad76d441c4bf438f3f9ee9db873a5a1e6fdf Mon Sep 17 00:00:00 2001 From: JYX Date: Fri, 1 Mar 2019 11:25:45 +0800 Subject: [PATCH 1/3] Update build.js to generate correct source-map --- packages/@vuepress/core/lib/build.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/@vuepress/core/lib/build.js b/packages/@vuepress/core/lib/build.js index 57aaefc728..682d0e9d06 100644 --- a/packages/@vuepress/core/lib/build.js +++ b/packages/@vuepress/core/lib/build.js @@ -47,7 +47,9 @@ module.exports = async function build (sourceDir, cliOptions = {}) { // find and remove empty style chunk caused by // https://github.com/webpack-contrib/mini-css-extract-plugin/issues/85 // TODO remove when it's fixed - await workaroundEmptyStyleChunk() + if (!clientConfig.devtool && (!clientConfig.plugins || !clientConfig.plugins.some(p => p instanceof webpack.SourceMapDevToolPlugin || p instanceof webpack.EvalSourceMapDevToolPlugin))) { + await workaroundEmptyStyleChunk() + } // create server renderer using built manifests const renderer = createBundleRenderer(serverBundle, { From 68c70d55552f69724c3da5e55ac99a6908dc4023 Mon Sep 17 00:00:00 2001 From: JYX Date: Fri, 1 Mar 2019 13:40:45 +0800 Subject: [PATCH 2/3] Update yarn.lock to use yarn registry The line is generated by yarn. Not hand-written. --- yarn.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn.lock b/yarn.lock index 64877e1baa..c33c127ab1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6568,7 +6568,7 @@ markdown-it-anchor@^5.0.2: markdown-it-chain@^1.3.0: version "1.3.0" - resolved "http://registry.npm.taobao.org/markdown-it-chain/download/markdown-it-chain-1.3.0.tgz#ccf6fe86c10266bafb4e547380dfd7f277cc17bc" + resolved "https://registry.yarnpkg.com/markdown-it-chain/-/markdown-it-chain-1.3.0.tgz#ccf6fe86c10266bafb4e547380dfd7f277cc17bc" dependencies: webpack-chain "^4.9.0" From 7413e530ca46252922fc08de251dc47307a9dbae Mon Sep 17 00:00:00 2001 From: ULIVZ <472590061@qq.com> Date: Sun, 3 Mar 2019 00:28:04 +0800 Subject: [PATCH 3/3] chore: format code --- packages/@vuepress/core/lib/build.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/@vuepress/core/lib/build.js b/packages/@vuepress/core/lib/build.js index 682d0e9d06..23e49bbc96 100644 --- a/packages/@vuepress/core/lib/build.js +++ b/packages/@vuepress/core/lib/build.js @@ -47,7 +47,11 @@ module.exports = async function build (sourceDir, cliOptions = {}) { // find and remove empty style chunk caused by // https://github.com/webpack-contrib/mini-css-extract-plugin/issues/85 // TODO remove when it's fixed - if (!clientConfig.devtool && (!clientConfig.plugins || !clientConfig.plugins.some(p => p instanceof webpack.SourceMapDevToolPlugin || p instanceof webpack.EvalSourceMapDevToolPlugin))) { + if (!clientConfig.devtool && (!clientConfig.plugins || + !clientConfig.plugins.some(p => + p instanceof webpack.SourceMapDevToolPlugin || + p instanceof webpack.EvalSourceMapDevToolPlugin + ))) { await workaroundEmptyStyleChunk() }