This is more of a question than an issue. Does it make sense that I have to import twice in order to achieve an import with side effects? Consider the following D3 build:
import {
event,
mouse,
namespace,
namespaces,
requote,
select,
selectAll,
selection,
touch,
touches
} from "d3-selection";
import {
ease,
transition
} from "d3-transition";
import "d3-transition";
export default {
get event() { return event; },
mouse: mouse,
namespace: namespace,
namespaces: namespaces,
requote: requote,
select: select,
selectAll: selectAll,
selection: selection,
touch: touch,
touches: touches,
ease: ease,
transition: transition
};
The first import of d3-transition exposes ease and transition. But the second is also needed to set selection.prototype.transition.
It makes sense that Rollup would ignore the side-effects by default, so that I can explicitly chose to include that code (or not). But I wanted to double-check that this seems right to you.
This is more of a question than an issue. Does it make sense that I have to import twice in order to achieve an import with side effects? Consider the following D3 build:
The first import of d3-transition exposes ease and transition. But the second is also needed to set selection.prototype.transition.
It makes sense that Rollup would ignore the side-effects by default, so that I can explicitly chose to include that code (or not). But I wanted to double-check that this seems right to you.