mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 22:25:12 +00:00
fix: disable node-externals
for dev mode (#5414)
This commit is contained in:
parent
159123feea
commit
a5a165749a
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user