This is a fork of the original D3 Custom Bundle that demonstrates how Rollup includes unnecessary JavaScript in the build when using the package d3
, as opposed to d3-selection
.
Original bundle size is 11.7 Kb. The bundle size here is 185.7 Kb.
xxxxxxxxxx
<meta charset="utf-8">
<body>
<script src="d3.min.js"></script>
<script>
d3.select("body").append("h1").text("Hello, world!");
</script>