-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
tracking issue: async loader for module interop #11233
Comments
I'm beginning to research what APIs will be exposed by V8 to figure out what we will need to do in node to implement the loader. I believe that Brad has done some of this work already, so hoping to sync with him when he gets back from vacation |
Note that the API changes in V8 5.6 (I did not check 5.7). |
Nice to see this coming a long. That said I'm really worried about the choice of |
@RobertWHurst in reality it will make it much simpler, and enable tooling to be much more straightforward and powerful as it determines how to parse, bundle, and serve CJS vs ESM. This isn't the place to debate it, though. |
@ljharb adding the new extension is effectively forking the language. That has negative consequences as well. I'd argue these consequences outweigh the benefits. But I'll leave it at that as you say. See you in another thread 😉 |
The spec adding a new parsing goal is what "forked" the language in the way you're describing; adding a new extension is the inevitable result of that, because the sole purpose of a file extension is to indicate a parsing goal. |
@ljharb I agree with that, I think theres a valid argument that it aught to be forked. A new modules system is a massive change, but that's not the precedent set thus far by the browser vendors or standards committees. I'd argue it's in Node's interest to align with the precedent the browser vendors put forth for the sake of interop. On the other hand, if we were able to push the browser vendors to accept a new extension then I think my concerns evaporate. Thanks 🍻 |
Browsers already accept the new extension (or any extension you wish; extensions are not used in browsers). .mjs works fine there. |
Thanks for straightening my out on that @domenic. I didn't know that |
It's a shame that Node can't be as flexible as browsers when it comes to file extensions. |
@chrisveness It could be (and to some degrees it is). But it offers certain features that require file extensions (like automatically expanding filenames, loading JSON as data, hooks to compile other languages on the fly). But node can load files with random extensions as JS, just like a browser. EDIT: Removed distracting side note. |
move all discussion on things related to resolution/detection to nodejs/node-eps#13 please |
@bmeck This is still being used, right? Is it OK to put a |
Pr is open, closing is fine
…On Jul 29, 2017 10:09 PM, "Rich Trott" ***@***.***> wrote:
@bmeck <https://github.com/bmeck> This is still being used, right? Is it
OK to put a help wanted label on this for any eager folks wanting to
implement this stuff Or would that be unhelpful/counterproductive?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11233 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAOUo094nGsg8W4ccdZUeDnafJcE6yfJks5sS_QFgaJpZM4L6bDG>
.
|
@bmeck Please feel free to edit the title or anything else if I'm being imprecise or worse with anything.
CTC has tentatively agreed to try implementing async module loading. This issue is being opened to have a central place to track progress, issues, conversation, questions, whatever.
Labeling
ctc-agenda
because we are probably going to want to talk about this at least a little bit every weekly meeting for a while.js:context
- urlnode:context
- require/__dirname/etc.import()
require
would have found somethingThe text was updated successfully, but these errors were encountered: