You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While we have some isomorphism working to some degree, we're still running into issues with the deployed version of PKE. Otherwise it currently works when hosting locally.
The main issue is that some node modules are being included in the bundled client code. Even if these are not used the very existence of these imports in the client on the browser results in CORS errors trying to import them. We need to remove any chance of these imports when using the WebsocketClient entirely.
To fix this we just need to ensure that no node imports are done within any imports used by the client side code. The client side needs to be fully isomorphic however the server will not be supported within browsers.
Just skimming through the code I can see that utils.ts and WebsocketStream.ts has imports to node modules. These are also common to server and client code. We'll need to look into isomorphic wrappers for these node modules.
Specification
While we have some isomorphism working to some degree, we're still running into issues with the deployed version of PKE. Otherwise it currently works when hosting locally.
The main issue is that some node modules are being included in the bundled client code. Even if these are not used the very existence of these imports in the client on the browser results in
CORSerrors trying to import them. We need to remove any chance of these imports when using theWebsocketCliententirely.To fix this we just need to ensure that no node imports are done within any imports used by the client side code. The client side needs to be fully isomorphic however the server will not be supported within browsers.
Just skimming through the code I can see that
utils.tsandWebsocketStream.tshas imports to node modules. These are also common to server and client code. We'll need to look into isomorphic wrappers for these node modules.Additional context
WebSocketsupport #32Tasks
WebSocketsupport #32Polykey-Enterprisewhen this has been resolved.