Closed mahnunchik closed 4 months ago
It will not be a runtime dependency unless you direcly import it due to how tree-shaking is setup.
Yes, it is true. But I think there is sense to separate crypto primitives (really small module in v5) and network helper to separate packages.
For the dependency list example above, I will never use the network but ws
part of @xrplf/isomorphic
module is always installed.
@mahnunchik I appreciate your suggestion and concern, but for the purposes of the maintainability of the project, the ws
package is very small and as @ckniffen mentioned with tree shaking bundle sizes in a non-node environment are not impacted.
For some background context, there was previously debate and discussion about separating packages out in the first place. It was settled that this approach, for now, was the right balance between optimization and maintainability.
That said, if there is enough community interest for this change, feel free to have more people show up and comment and it can be reconsidered. For now, I'll be closing this issue out for maintainability of repo hygiene. Thanks again for making the suggestion!
@mahnunchik Additionally, you may be able to follow this guide on forcibly removing nested packages - https://stackoverflow.com/questions/36758157/how-can-i-forcibly-exclude-a-nested-dependency-for-npm
Hello,
I've faced that
@xrplf/isomorphic
depends on network related packagews
(huge).I'm using only
crypto
related things:I think there is sense to move
ws
package to separate folder/module. Thus, only network-bound modules will depend on it.