-
Notifications
You must be signed in to change notification settings - Fork 46
Closed
Description
This is the error that I get when importing isomorphic-ws
and bundling with rollup
:
[!] Error: 'default' is not exported by node_modules/isomorphic-ws/browser.js, imported by node_modules/@holochain/conductor-api/lib.es/websocket/client.js
https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module
node_modules/@holochain/conductor-api/lib.es/websocket/client.js (10:7)
8: });
9: };
10: import Websocket from "isomorphic-ws";
So you have to add the rollup commonjs plugin to make it work.
I think it would be really good if this library would export es modules as well, it would improve ease of use in a lot of cases, even more so when it only needs to expose the native WebSocket
object. I can make a PR if there is good feedback about this.
llIllIllllIIIlllllll