From 8aaffc807b1f1df24acada89f2bc6f36384cc6bd Mon Sep 17 00:00:00 2001 From: neverland Date: Fri, 9 Aug 2019 16:30:07 +0800 Subject: [PATCH] [Build] adust globalObject to support module script (#4080) --- build/webpack.pkg.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/webpack.pkg.js b/build/webpack.pkg.js index 37ebd8c16..f134385b5 100644 --- a/build/webpack.pkg.js +++ b/build/webpack.pkg.js @@ -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: {