Skip to content

Commit 76338d7

Browse files
refactor: use globalObject "this" in webpack configuration
1 parent ee0a35d commit 76338d7

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

support/webpack.config.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,7 @@ module.exports = {
1111
filename: "engine.io.js",
1212
library: "eio",
1313
libraryTarget: "umd",
14-
// see https://github.com/webpack/webpack/issues/6525
15-
globalObject: `(() => {
16-
if (typeof self !== 'undefined') {
17-
return self;
18-
} else if (typeof window !== 'undefined') {
19-
return window;
20-
} else if (typeof global !== 'undefined') {
21-
return global;
22-
} else {
23-
return Function('return this')();
24-
}
25-
})()`
14+
globalObject: "this"
2615
},
2716
mode: "development",
2817
node: false,

0 commit comments

Comments
 (0)