Skip to content

Export ES modules #19

@guillemcordoba

Description

@guillemcordoba

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions