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
Support source phase import syntax #15486
Conversation
@@ -26,6 +26,7 @@ const parseOptions = { | |||
allowUndeclaredExports: true, | |||
errorRecovery: true, | |||
createParenthesizedExpressions: true, | |||
createImportExpressions: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@babel/parser
requires this to parse import.source("x")
syntax.
src/language-js/utils/index.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes in this file is for support combination of Import Assertions syntax and createImportExpressions
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test cases are from babel/babel#15829
We close this PR because its contents are included in #15487 |
Description
Context: #15471
Based on #15485
Supports source phase import formatting.
Checklist
docs/
directory).changelog_unreleased/*/XXXX.md
file followingchangelog_unreleased/TEMPLATE.md
.✨Try the playground for this PR✨