Open ZipBrandon opened 2 years ago
With a bit of further investigation, this seems like this improvement would be yielded from usage of the alternate d3 libraries and not d3.
This can be circumvented with redeclaring imports so they don't import from the index of d3; or declaring sideEffects in the package.json
Can you please elaborate more on what you mean by this? An example code snippet to explain your ideas might be helpful.
Also, this could also be solved by moving d3
to peerDependencies
and offload d3
import mechanism to the build system used by the project. But, most of the consumers of this library may not use d3
in their project and they might just need this component.
Adding react-d3-speedometer to an application that makes extensive use of d3 via nivo results in importing the entire d3 package. This can be circumvented with redeclaring imports so they don't import from the index of d3; or declaring sideEffects in the package.json.