Edoardo Luppi
03/25/2024, 12:53 PMJsNodeSocket
implementation, and on the browser I'll have a JsWebSocket
implementation (before you ask, no I can't use WebSockets outside of browser).
The correct implementation to instantiate is established at runtime.
JsNodeSocket
internally uses kotlin-wrappers Node.js externals.
I suppose that in this state compiling once and haveing the project run on both Node.js and the browser is impossible.
The outputted JS will try to require('node:net')
at the very beginning, failing if inside of a browser.
What can I do to avoid this? Not use externals?