You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 and axisTop is different.
Using the build script
npm run build` with treeshaking throw an error `(node:3700) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: 'axisBottom' is not exported by d3-axis@1.0.12#src/index
(node:3700) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
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 script
but
d3-axis
really exportsaxisBottom
but without treeshaking, the build is successfully.
The text was updated successfully, but these errors were encountered: