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
When building a project that uses d3-transition (which overrides the selection prototype in d3-selection), the scope hoisting that is enabled by default builds a broken package (d3-transition fails to override the selection prototype to add a transition function). This looks like #3780, except it's still broken in stable Parcel 2.
ETA: it works when scope hoisting is disabled (i.e. I build with --no-scope-hoist flag), so that's why I'm pretty confident scope hoisting is the culprit here.
The bundled output runs correctly (scope hoisting bails, probably).
😯 Current Behavior
The bundled output throws
Uncaught TypeError: wt(...).transition is not a function
because the selection prototype is not receiving a transition() function from d3-transition.
💁 Possible Solution
This might be due to some combination of how the scope hoisting is renaming functions and how the d3 library is patching the prototypes... I think probably the scope hoisting should just bail, but it doesn't for some reason.
🐛 bug report
When building a project that uses
d3-transition
(which overrides the selection prototype ind3-selection
), the scope hoisting that is enabled by default builds a broken package (d3-transition
fails to override the selection prototype to add atransition
function). This looks like #3780, except it's still broken in stable Parcel 2.ETA: it works when scope hoisting is disabled (i.e. I build with
--no-scope-hoist
flag), so that's why I'm pretty confident scope hoisting is the culprit here.🎛 Configuration (.babelrc, package.json, cli command)
package.json
🤔 Expected Behavior
The bundled output runs correctly (scope hoisting bails, probably).
😯 Current Behavior
The bundled output throws
because the selection prototype is not receiving a
transition()
function from d3-transition.💁 Possible Solution
This might be due to some combination of how the scope hoisting is renaming functions and how the d3 library is patching the prototypes... I think probably the scope hoisting should just bail, but it doesn't for some reason.
🔦 Context
💻 Code Sample
Here's a minimum working example:
🌍 Your Environment
The text was updated successfully, but these errors were encountered: