chr15m / bugout

Back end web app services over WebRTC.
https://chr15m.github.io/bugout
MIT License
603 stars 59 forks source link

Build is broken with WebTorrent 2.x.x #68

Closed bertung closed 1 year ago

bertung commented 1 year ago

Build is broken with WebTorrent 2.x.x version which is significantly faster and smaller than the 1.9.x branch. It seems like es6 style imports are expected. There is "terser" for minification, but browserify needs babelify I guess which I haven't used before.

chr15m commented 1 year ago

Ok, thanks for the heads up!

bertung commented 1 year ago

It is possible to supply webtorrent externally using

browserify -s Bugout --external webtorrent index.js > bugout.js

chr15m commented 1 year ago

What should the solution be here do you think? Upgrade Bugout to use es6 style imports?

bertung commented 1 year ago

I think the problem is with the webtorrent browserify trying to embed to the final executable. New versions of web torrent uses es6 style imports. If you exclude webtorrent, compilation by browserify succeeds. I am not a npm expert but, it may also be related to only using imports throughout the entire code. The initial solution without messing with the bugout code would be externally supplying the webtorrent client which is offered in options of bugout.

bertung commented 1 year ago

You may close this issue since there is a workaround.

draeder commented 1 year ago

Closing since there is a workaround