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(