From 460c200d2884b4ae03abd6ac815604eaf7b265c7 Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 11 Jun 2018 16:27:17 -0400 Subject: [PATCH] fix(unit-mocha): node externals are unnecessary for testing client code close #1548 --- packages/@vue/cli-plugin-unit-mocha/index.js | 6 +----- packages/@vue/cli-plugin-unit-mocha/package.json | 3 +-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/@vue/cli-plugin-unit-mocha/index.js b/packages/@vue/cli-plugin-unit-mocha/index.js index dbc06f183..8ff131d5b 100644 --- a/packages/@vue/cli-plugin-unit-mocha/index.js +++ b/packages/@vue/cli-plugin-unit-mocha/index.js @@ -3,11 +3,7 @@ module.exports = api => { if (process.env.NODE_ENV === 'test') { webpackConfig.merge({ target: 'node', - devtool: 'inline-cheap-module-source-map', - externals: [ - require('webpack-node-externals')(), - 'vue-server-renderer' - ] + devtool: 'inline-cheap-module-source-map' }) // when target === 'node', vue-loader will attempt to generate diff --git a/packages/@vue/cli-plugin-unit-mocha/package.json b/packages/@vue/cli-plugin-unit-mocha/package.json index d043d16aa..06695daf8 100644 --- a/packages/@vue/cli-plugin-unit-mocha/package.json +++ b/packages/@vue/cli-plugin-unit-mocha/package.json @@ -25,8 +25,7 @@ "jsdom": "^11.10.0", "jsdom-global": "^3.0.2", "mocha": "^5.1.1", - "mocha-webpack": "^2.0.0-beta.0", - "webpack-node-externals": "^1.7.2" + "mocha-webpack": "^2.0.0-beta.0" }, "devDependencies": { "@vue/test-utils": "^1.0.0-beta.16",