Skip to content

Commit

Permalink
refactor: use globalObject "this" in webpack configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne committed Feb 24, 2021
1 parent ee0a35d commit 76338d7
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions support/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,7 @@ module.exports = {
filename: "engine.io.js",
library: "eio",
libraryTarget: "umd",
// see https://github.com/webpack/webpack/issues/6525
globalObject: `(() => {
if (typeof self !== 'undefined') {
return self;
} else if (typeof window !== 'undefined') {
return window;
} else if (typeof global !== 'undefined') {
return global;
} else {
return Function('return this')();
}
})()`
globalObject: "this"
},
mode: "development",
node: false,
Expand Down

0 comments on commit 76338d7

Please sign in to comment.