d3 / d3-transition

Animated transitions for D3 selections.
https://d3js.org/d3-transition
ISC License
223 stars 65 forks source link

sideEffects: false in package.json #100

Closed mtraynham closed 4 years ago

mtraynham commented 4 years ago

This particular commit (https://github.com/d3/d3-transition/commit/6c1c79b8d4de51f886ac8ea9d217eb32aedb561c) adds sideEffects: false in the package.json file.

For Webpack tree shaking this will essentially remove the modules if they were imported via

import 'd3-transition';

Doesn't d3-transition patch d3-selection as a side effect though? Is there another intended way to attach transitions to selections?

mbostock commented 4 years ago

This was a mistake. I’ll revert.

mbostock commented 4 years ago

Fixed in 1.3.2.

mtraynham commented 4 years ago

Thanks!

mbostock commented 4 years ago

Thanks for the report! This was just a copy-paste error on my part. My eyes kind of glazed over after doing this for 30+ packages…

mtraynham commented 4 years ago

No worries! I pulled the new version and have verified it works correctly. Thanks again!