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
With the above code, babel transpiles to a closure without module.exports. Seems to be unique to the combination of exporting an arrow function that returns an object containing a key whose value is an arrow function where the first arg is deconstructed with a key of the same name.
If the keys are different (x: ({y}) => {}) or the deconstructed key is renamed (e.g. x: ({x: y}) => {}), it doesn't reproduce.
If you use function in place of either arrow function, it doesn't reproduce.
If you store the closure into a local variable and then export that, it doesn't reproduce.
Reproducible via the babel repl as well
The text was updated successfully, but these errors were encountered:
Bug information
Options
Input code
Description
With the above code, babel transpiles to a closure without
module.exports
. Seems to be unique to the combination of exporting an arrow function that returns an object containing a key whose value is an arrow function where the first arg is deconstructed with a key of the same name.x: ({y}) => {}
) or the deconstructed key is renamed (e.g.x: ({x: y}) => {}
), it doesn't reproduce.function
in place of either arrow function, it doesn't reproduce.Reproducible via the babel repl as well
The text was updated successfully, but these errors were encountered: