Skip to content

Replace wildcard d3 imports with named sub-package imports#28

Merged
islubee merged 1 commit intomainfrom
claude/explore-repo-overview-aYE7G
Apr 20, 2026
Merged

Replace wildcard d3 imports with named sub-package imports#28
islubee merged 1 commit intomainfrom
claude/explore-repo-overview-aYE7G

Conversation

@islubee
Copy link
Copy Markdown
Owner

@islubee islubee commented Apr 20, 2026

Every 'import * as d3 from "d3"' replaced with imports from the specific d3 sub-packages actually used (d3-scale, d3-array, d3-shape, d3-format, d3-time-format, d3-scale-chromatic). Rollup can now tree-shake unused d3 modules, reducing the bundled d3 footprint significantly. Line.js dynamic d3type dispatch replaced with a static generators map.

Every 'import * as d3 from "d3"' replaced with imports from the
specific d3 sub-packages actually used (d3-scale, d3-array, d3-shape,
d3-format, d3-time-format, d3-scale-chromatic). Rollup can now
tree-shake unused d3 modules, reducing the bundled d3 footprint
significantly. Line.js dynamic d3[type]() dispatch replaced with a
static generators map.

https://claude.ai/code/session_01Bf9veNX9mqfMqrCEGnujAo
@islubee islubee merged commit 37af6b2 into main Apr 20, 2026
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants