Open pYr0x opened 6 years ago
Looked into this. Not totally sure what is going on. We use a slightly old version (maybe a few months) of rollup for tree-shaking, I wonder if there was a bug in that old version. I'd be interested to see what happens in their latest version. Could just be a matter of upgrading.
Longer term I'd like to get rid of the rollup dependency since it doesn't fit super well with what steal-tools does (it moves dependencies around, for example) and since steal does tree-shaking on its own I'd rather just improve that rather than maintain 2 separate tree-shaking sources of bugs.
see this test repo. https://github.com/pYr0x/import-bug
i have two files, both imported from "d3-axis". the first one imported
{axisLeft, axisBottom}
and the second one imported{axisLeft, axisTop}
.you see that
axisBottom
andaxisTop
is different. Using the build scriptbut
d3-axis
really exportsaxisBottom
but without treeshaking, the build is successfully.