Repository navigation
Replies: 2 comments 6 replies
|
Would like to add a specific actionable result or subissue:
|
3 replies
|
Copying my comment from #2134 I would like to see js-libp2p not require a bundler at all in order to consume in the browser. Related to our portability initiative. I think that js-libp2p core should be as portable as possible, and that means using isomorphic, or at least portable code throughout. Also this case, specifically, feels a bit silly. We're requiring browser consumers to bundle an events polyfill for a nodejs-specific feature (using setMaxListeners to avoid a warning) with no benefit to the browser consumer. |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
#2110 raised an issue about the portability of js-libp2p's core modules, js bundlers are going away anytime soon, and so consumers may run into these issues again depending on their configurations. As @wemeetagain suggested to avoid the hassle of bundlers, whilst making libp2p truly portable, we should:
a) stay away from modules which are not cross-environment.
b) if we do need to use a module that is environment specific, we should at least conditionally import it and/or return a no-op for the inapplicable environment.
All reactions