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

Dynamic Modules Development in Node.js #24894

Closed
guybedford opened this issue Dec 7, 2018 · 2 comments
Closed

Dynamic Modules Development in Node.js #24894

guybedford opened this issue Dec 7, 2018 · 2 comments
Labels
esm Issues and PRs related to the ECMAScript Modules implementation. module Issues and PRs related to the module subsystem.

Comments

@guybedford
Copy link
Contributor

I wanted to just provide a brief update on the status of the dynamic modules specification in Node.js - https://github.com/nodejs/dynamic-modules.

This proposal is designed to support the use case of named exports from CommonJS when importing them from ES Modules:

import { exportName } from 'cjs-package';

The proposal is moving to final review stages with the details now all worked out as an ECMA-262 patch (tc39/ecma262#1306), Node.js specification (https://nodejs.github.io/dynamic-modules/) and v8 implementation (https://chromium-review.googlesource.com/c/v8/v8/+/1303725).

At the last Node.js modules group meeting there was consensus that the group would continue to support this work going forward. That does not mean that we will definitely use this approach in Node.js, but that we as a group are committed to continuing to develop this work as a viable path forward as we make the various decisions around ES modules interop.

It's important for TC39 and v8 to know that this is a proposal with the collective support of Node.js as a project, so I'm creating this issue to get wider feedback from everyone involved.

If anyone has any questions or concerns about the approach, or Node.js advocating this work further, please do let us know here.

@vsemozhetbyt vsemozhetbyt added esm Issues and PRs related to the ECMAScript Modules implementation. module Issues and PRs related to the module subsystem. labels Dec 7, 2018
@devsnek
Copy link
Member

devsnek commented Dec 7, 2018

:shipit:

@nodejs/modules @nodejs/v8

@jdalton
Copy link
Member

jdalton commented Dec 12, 2018

I'm not a fan of making export * from "cjs" throw.
Please see my comment nodejs/dynamic-modules#11 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
esm Issues and PRs related to the ECMAScript Modules implementation. module Issues and PRs related to the module subsystem.
Projects
None yet
Development

No branches or pull requests

5 participants