Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"export default from" identifier not supported #11665

Closed
guybedford opened this issue Jun 3, 2020 · 3 comments
Closed

"export default from" identifier not supported #11665

guybedford opened this issue Jun 3, 2020 · 3 comments
Labels
i: bug i: needs triage outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@guybedford
Copy link
Contributor

guybedford commented Jun 3, 2020

Bug Report

Current behavior
A clear and concise description of the behavior.

Input Code

function from(x) {
    return x === x[Symbol.iterator]() ? Array.from(x) : x;
}
export default from;

Expected behavior

The above is a valid ES module and will execute in browsers, but throw when parsed by Babylon.

  • Babel version(s): [e.g. v6.0.0, v7.0.0-beta.34] 7.10.2

Possible Solution

Acorn handles this parsing fine, so it should be a relatively straightforward parser fix.

@babel-bot
Copy link
Collaborator

Hey @guybedford! 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."

@JLHwung
Copy link
Contributor

JLHwung commented Jun 4, 2020

Duplicate of #7293

@JLHwung JLHwung marked this as a duplicate of #7293 Jun 4, 2020
@JLHwung JLHwung closed this as completed Jun 4, 2020
@JLHwung
Copy link
Contributor

JLHwung commented Jun 4, 2020

FYI this will be fixed in #11676.

@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Sep 4, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
i: bug i: needs triage outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

No branches or pull requests

3 participants