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

Support for import assertions #8885

Open
Ashoat opened this issue May 22, 2022 · 0 comments
Open

Support for import assertions #8885

Ashoat opened this issue May 22, 2022 · 0 comments

Comments

@Ashoat
Copy link

Ashoat commented May 22, 2022

Proposal

As of Node 16.14, Node's experimental support for ESM requires that imports of JSON modules are annotated with import assertions. Node docs for Node 18, Node 16

Flow is not currently able to parse this new syntax, either for static imports or for dynamic imports. As a result, it's not currently possible to use Flow with Node's experimental ESM support as of Node 16.14.

Use case

By adding support for import assertions (both for static imports as well as dynamic imports), Flow would make it possible to use Flow with ESM import syntax running natively on Node. Node 16.14 and Node 18 (with ESM support listed as "stable") both require import assertions for imports of JSON modules, which makes it impossible to use Flow with modern versions of Node using ESM natively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant