[Build] adust globalObject to support module script (#4080)

This commit is contained in:
neverland 2019-08-09 16:30:07 +08:00 committed by GitHub
parent 24f5a91cd3
commit 8aaffc807b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,7 +16,8 @@ module.exports = Object.assign(config, {
libraryTarget: 'umd',
filename: isMinify ? '[name].min.js' : '[name].js',
umdNamedDefine: true,
globalObject: 'this'
// https://github.com/webpack/webpack/issues/6522
globalObject: 'typeof self !== \'undefined\' ? self : this'
},
externals: {
vue: {