fix: memory leak in dev mode (#5399)

This commit is contained in:
Xin Du (Clark) 2019-03-27 14:34:16 +00:00 committed by GitHub
parent c009a202b8
commit 04ddcac4f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,6 +28,13 @@ export default class WebpackServerConfig extends WebpackBaseConfig {
whitelist.push(new RegExp(escapeRegExp(posixModule)))
}
}
// Bundle vue js for avoiding single shared Vue instance
const { runInNewContext } = this.buildContext.options.render.bundleRenderer
if (runInNewContext === true) {
whitelist.push('vue')
}
return whitelist
}