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
Current Behavior
The commonjs and amd plugins create invalid throw new Error('"' + "foo" + '" is read-only.'); statements in the output when there is an import with the same name as used in the destructuring even though it's shadowed by a function parameter.
"use strict";var_x=require("./x");functiontest(foo){console.log(foo);[foo]=([1],function(){thrownewError('"'+"foo"+'" is read-only.');}());({
foo
}=({foo: 1},function(){thrownewError('"'+"foo"+'" is read-only.');}()));console.log(foo);}test(0);
Expected behavior/code
No Error's in output, like this when the import name is changed:
Hey @dasa! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.
If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite."
Bug Report
Current Behavior
The commonjs and amd plugins create invalid
throw new Error('"' + "foo" + '" is read-only.');
statements in the output when there is an import with the same name as used in the destructuring even though it's shadowed by a function parameter.Input Code
Output:
Expected behavior/code
No Error's in output, like this when the import name is changed:
Babel Configuration (.babelrc, package.json, cli command)
Environment
Possible Solution
Additional context/Screenshots
Add any other context about the problem here. If applicable, add screenshots to help explain.
The text was updated successfully, but these errors were encountered: