By default withLibp2p configures a libp2p node for the current environment.
Each option passed replaces the default for that key. Pass config: 'merge'
to merge the options into the default config instead.
For full control over your node (and the bundle size), use withLibp2pLight
from @helia/libp2p/light. That entry point does not load the default
config or any of its dependencies:
Adds libp2p functionality to Helia
Example: With default config
Example: Custom config
By default
withLibp2pconfigures a libp2p node for the current environment.Each option passed replaces the default for that key. Pass
config: 'merge'to merge the options into the default config instead.For full control over your node (and the bundle size), use
withLibp2pLightfrom@helia/libp2p/light. That entry point does not load the default config or any of its dependencies: