portal

bahulneel 2023-12-28T12:18:20.492159Z

Can anyone help? I’m building a library for use from within js node & browser apps as an ESM module. I’d also like to expose portal as a dev tool. However, I’m having issues compiling the ESM module with the portal.api ns. I think this is because shadow assumes a browser target. Thinking about it, something like the shadow remote path seems like a more suitable option as the concerns are better separated, but I feel like I’m going to get myself into the same place WRT compiling for node. Has anyone had any experience or have any hints regarding this?

bahulneel 2024-01-03T16:35:22.789069Z

That’s what I ended up doing, thanks.

bahulneel 2024-01-03T16:35:53.812989Z

As a bonus question, is it possible to clear a remote portal from the client?

djblue 2024-01-04T00:08:53.159939Z

Currently no, but I could see adding that feature to the remote API 👍

👍 1
bahulneel 2023-12-28T14:15:09.798389Z

I think I answered my own question. The web client uses js/fetch, which works “everywhere”

djblue 2023-12-28T22:38:16.797499Z

Using the remote client works. Also, portal.api is for node and portal.web has the same api but is for the browser.