Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependencies memory heap #58

Open
defusioner opened this issue Nov 30, 2020 · 2 comments
Open

Dependencies memory heap #58

defusioner opened this issue Nov 30, 2020 · 2 comments

Comments

@defusioner
Copy link

Hello there! What a nice library!

Do you know if there is an option to lighten the dependencies during production build? Our 256Mb machine exploses just once I add the d3 as a direct dependency for this lib.

Are there any workarounds for d3 production builds that could reduce the global heap?

Is it possible to reduce d3 dependency for this library?

Thanks

@Martin36
Copy link
Owner

It should be possible. Maybe importing only the used d3 libraries, instead of the whole thing, could be a solution.

@stevenhankin
Copy link
Contributor

Not sure if using the d3 modules will help

As an example I've created a fork with just the required modules from d3 included:
https://github.com/stevenhankin/react-gauge-chart/tree/feat/use-modules

branch dist build
master 24k 275M
feat/use-modules 28k 268M

So a Production Build is larger when using individual d3 modules, but the Dev Build is a bit lighter.

The dev build is quite large because it's using React Scripts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants