From a187f6f7801bba70f35e94f3cf47c936c1017f85 Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Fri, 14 May 2021 16:56:29 +0800 Subject: [PATCH] fix(mocha): set mode to `none` to avoid DefinePlugin conflict --- packages/@vue/cli-plugin-unit-mocha/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/@vue/cli-plugin-unit-mocha/index.js b/packages/@vue/cli-plugin-unit-mocha/index.js index 9c921650fc..f95cd7a9ec 100644 --- a/packages/@vue/cli-plugin-unit-mocha/index.js +++ b/packages/@vue/cli-plugin-unit-mocha/index.js @@ -1,6 +1,8 @@ module.exports = api => { api.chainWebpack(webpackConfig => { if (process.env.NODE_ENV === 'test') { + webpackConfig.mode('none') + webpackConfig.merge({ target: 'node', devtool: 'inline-cheap-module-source-map'