Skip to content

Commit

Permalink
fix: disable node-externals for dev mode (#5414)
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkdo authored and pi0 committed Mar 31, 2019
1 parent 159123f commit a5a1657
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions packages/webpack/src/config/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit a5a1657

Please sign in to comment.