-
Beta Was this translation helpful? Give feedback.
Answered by
Leitet
Mar 9, 2021
Replies: 2 comments 4 replies
-
Changing from 'window' to 'this' (this is undefined) is probably what introduced the error: socket.io/client-dist/socket.io.js Line 15 in 225ade0 Loading a script using ESM will not set "this" to "window". This is undefined in a ESM-module. Loading the script using "script-tags" will set this to window though. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
darrachequesne
-
So after som research, it boils down to globalObject in webpack.config:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Changing from 'window' to 'this' (this is undefined) is probably what introduced the error:
socket.io/client-dist/socket.io.js
Line 15 in 225ade0
Loading a script using ESM will not set "this" to "window". This is undefined in a ESM-module. Loading the script using "script-tags" will set this to window though.