Skip to content

Commit

Permalink
fix: restore support for web workers
Browse files Browse the repository at this point in the history
A previous change ([1], included in 3.0.5) broke support for web
workers, which threw "window is not defined" when importing the bundle
in a web worker.

Related: socketio/socket.io#3809

Reference: https://webpack.js.org/configuration/output/#outputglobalobject

[1]: 8c08c5d
  • Loading branch information
darrachequesne committed Feb 25, 2021
1 parent 311c5d1 commit 13b32b3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions support/webpack.config.js
Expand Up @@ -11,6 +11,7 @@ module.exports = {
filename: "socket.io.js",
library: "io",
libraryTarget: "umd",
globalObject: "this",
},
mode: "development",
devtool: "source-map",
Expand Down

0 comments on commit 13b32b3

Please sign in to comment.