Replies: 2 comments 6 replies
-
Would like to add a specific actionable result or subissue:
|
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
#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.
Beta Was this translation helpful? Give feedback.
All reactions