From a5a165749ad34fd88c366ebddd2d5853e04b016f Mon Sep 17 00:00:00 2001 From: "Xin Du (Clark)" Date: Sun, 31 Mar 2019 21:35:06 +0100 Subject: [PATCH] fix: disable `node-externals` for dev mode (#5414) --- packages/webpack/src/config/server.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/webpack/src/config/server.js b/packages/webpack/src/config/server.js index eb72b24f9b..1ad110141f 100644 --- a/packages/webpack/src/config/server.js +++ b/packages/webpack/src/config/server.js @@ -29,12 +29,6 @@ export default class WebpackServerConfig extends WebpackBaseConfig { } } - // Bundle vue js for avoiding single shared Vue instance - const { runInNewContext } = this.buildContext.options.render.bundleRenderer - if (runInNewContext === true) { - whitelist.push('vue') - } - return whitelist } @@ -94,7 +88,7 @@ export default class WebpackServerConfig extends WebpackBaseConfig { // https://webpack.js.org/configuration/externals/#externals // https://github.com/liady/webpack-node-externals // https://vue-loader.vuejs.org/migrating.html#ssr-externals - if (!this.buildContext.buildOptions.standalone) { + if (!this.dev && !this.buildContext.buildOptions.standalone) { this.buildContext.options.modulesDir.forEach((dir) => { if (fs.existsSync(dir)) { config.externals.push(