From 0d45cf4de7ae24b4f704354a6c87ef236cf51053 Mon Sep 17 00:00:00 2001 From: ULIVZ <472590061@qq.com> Date: Sun, 18 Nov 2018 01:47:26 +0800 Subject: [PATCH] fix: siteConfig.chainWebpack was executed twice. --- packages/@vuepress/core/lib/webpack/createClientConfig.js | 4 ---- packages/@vuepress/core/lib/webpack/createServerConfig.js | 4 ---- 2 files changed, 8 deletions(-) diff --git a/packages/@vuepress/core/lib/webpack/createClientConfig.js b/packages/@vuepress/core/lib/webpack/createClientConfig.js index 79a82e427f..8ddfef2659 100644 --- a/packages/@vuepress/core/lib/webpack/createClientConfig.js +++ b/packages/@vuepress/core/lib/webpack/createClientConfig.js @@ -67,10 +67,6 @@ module.exports = function createClientConfig (ctx) { }]) } - if (ctx.siteConfig.chainWebpack) { - ctx.siteConfig.chainWebpack(config, false /* isServer */) - } - ctx.pluginAPI.options.chainWebpack.syncApply(config, false /* isServer */) return config diff --git a/packages/@vuepress/core/lib/webpack/createServerConfig.js b/packages/@vuepress/core/lib/webpack/createServerConfig.js index 33aeb33321..d8bf1a3731 100644 --- a/packages/@vuepress/core/lib/webpack/createServerConfig.js +++ b/packages/@vuepress/core/lib/webpack/createServerConfig.js @@ -56,10 +56,6 @@ module.exports = function createServerConfig (ctx) { }]) } - if (ctx.siteConfig.chainWebpack) { - ctx.siteConfig.chainWebpack(config, true /* isServer */) - } - ctx.pluginAPI.options.chainWebpack.syncApply(config, true /* isServer */) return config