-
Notifications
You must be signed in to change notification settings - Fork 18
Remove default ".json" and ".node" resolution for ESM #3
Conversation
custom loaders should do this themselves. the translator is just dead code now. |
Agreed they can do it through instantiate, ok I've added another commit to remove the translator entirely as well. |
@ljharb Isn't the point of this fork to just create a "minimal kernel" as a starting point, so that further features can be layered on through PRs and so there is actually something tangible to discuss about those? Removing features in this context doesn't necessarily mean that they are not useful or have no place in the eventual implementation. |
@Janpot yes, but that requires consensus on what "minimal" means, and I don't think a minimal kernel is one that lacks the basic and core feature of resolution that already exists in node. |
715544b
to
5adac3c
Compare
I've added the removal of .node to the PR to align with the currently proposed minimal kernel. removing cjs support will come in a future push once createRequire function has landed upstream |
Closing in lieu of #6 |
In line with simplifying towards browser compatibility, this removes the default resolution of ".json" files from ESM (although ".json" can still be resolved from CommonJS of course).
Custom loaders could still add this back as the "json" translator is still defined though here.
Looking forward to the browser compatibility discussion :)
edit (@MylesBorins): I've also added the removal of .node to this PR.