Skip to content

Commit 8aaffc8

Browse files
authored
[Build] adust globalObject to support module script (youzan#4080)
1 parent 24f5a91 commit 8aaffc8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

build/webpack.pkg.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ module.exports = Object.assign(config, {
1616
libraryTarget: 'umd',
1717
filename: isMinify ? '[name].min.js' : '[name].js',
1818
umdNamedDefine: true,
19-
globalObject: 'this'
19+
// https://github.com/webpack/webpack/issues/6522
20+
globalObject: 'typeof self !== \'undefined\' ? self : this'
2021
},
2122
externals: {
2223
vue: {

0 commit comments

Comments
 (0)