Skip to content

Commit 5521364

Browse files
committed
Add isomorphic-ws to support use of obs-websocket-js as a CommonJS module in browsers
1 parent a4b515c commit 5521364

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

lib/Socket.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const WebSocket = require('ws');
1+
const WebSocket = require('isomorphic-ws');
22
const EventEmitter = require('events');
33
const hash = require('./util/authenticationHashing');
44
const Status = require('./Status');

package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
},
3838
"dependencies": {
3939
"debug": "^4.1.0",
40+
"isomorphic-ws": "^4.0.1",
4041
"sha.js": "^2.4.9",
4142
"ws": "^7.2.0"
4243
},

webpack.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ module.exports = {
2525
filename: '[name].js',
2626
library: 'OBSWebSocket'
2727
},
28-
externals: {
29-
ws: 'WebSocket'
30-
},
3128
devtool: 'source-map',
3229
plugins: [
3330
new BabiliPlugin({}, {

0 commit comments

Comments
 (0)