peers / peerjs

Simple peer-to-peer with WebRTC.
https://peerjs.com
MIT License
12.48k stars 1.43k forks source link

WebPack Mode Production with PeerJs #834

Closed sheibeck closed 3 years ago

sheibeck commented 3 years ago

I've been using PeerJs for a while now, and my local and my remote test server for my web application work. But, when I compile my code via webpack using mode: 'production', I can no longer make connections to other peers. The only place using "production" checks is when I use process.env.NODE_ENV for anything but to switch databases that I'm pulling some data from, so, I'm wondering if there is something going on with the NPM version of PeerJs when I compile for deploy using mode: 'production'.

This is my build script. My test site uses the exact same script and with the only difference being the mode = 'development' instead of 'production'.

https://github.com/sheibeck/fcs/blob/master/build/webpack.config.prod.js

Any help or insight into what PeerJs differences might occur with mode production would be helpful. Thank you.

sheibeck commented 3 years ago

Resolved. Something funky going on with my config.