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

Import Assertions for re-export statement is not allowed #12248

Closed
1 task done
sosukesuzuki opened this issue Oct 24, 2020 · 0 comments · Fixed by #12249
Closed
1 task done

Import Assertions for re-export statement is not allowed #12248

sosukesuzuki opened this issue Oct 24, 2020 · 0 comments · Fixed by #12249
Assignees
Labels
i: bug outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: parser Spec: Import Attributes

Comments

@sosukesuzuki
Copy link
Member

Bug Report

  • I would like to work on a fix!

Current behavior

Syntax error Unexpected token, expected ";" (1:31) is thrown.

REPL

Input Code

export { val } from './foo.js' assert { type: "javascript" };

Expected behavior

No syntax error is thrown.

Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)

const code = `export { val } from './foo.js' assert { type: "javascript" };`;
require("@babel/parser").parse(code, {
  sourceType: "module",
  plugins: ["importAssertions"],
});

Environment

Possible Solution

Additional context

According to the proposal, assert for export is allowed. https://github.com/tc39/proposal-import-assertions#re-export-statements

@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 Jan 26, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
i: bug outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: parser Spec: Import Attributes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant