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

Only import from d3-* modules #30

Closed
jfsiii opened this issue Aug 22, 2017 · 1 comment
Closed

Only import from d3-* modules #30

jfsiii opened this issue Aug 22, 2017 · 1 comment

Comments

@jfsiii
Copy link

jfsiii commented Aug 22, 2017

There are a few files which import from d3 which brings in all the d3-* modules even if they aren't used. While webpack & rollup can mitigate this, they still leave many unused functions.

Looking through the code I found these examples:

# src/lib/charts/bubble/BubbleD3.js
import { hierarchy, pack } from 'd3'

# src/lib/scale.js
import { scaleLinear, scaleBand, scalePoint } from 'd3'

# src/lib/charts/labels.js
import d3 from 'd3'

#src/lib/charts/pie/PieD3Svg.js
import d3 from 'd3'

# src/lib/charts/bubble/BubbleD3Svg.js
import d3 from 'd3'

I apologize for the noise if I've simply found some loose ends that aren't used/exported.

@plouc
Copy link
Owner

plouc commented Aug 26, 2017

@jfsiii, no problem, thank you for raising that, I've removed all those files.

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

No branches or pull requests

2 participants