Fork me on GitHub
#portal
<
2023-12-28
>
bahulneel12:12:20

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?

bahulneel14:12:09

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

djblue22:12:16

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

bahulneel16:01:22

That’s what I ended up doing, thanks.

bahulneel16:01:53

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

djblue00:01:53

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

👍 1