Replies: 0 comments 13 replies
|
Does snapshotting even work with ESM in V8? |
3 replies
|
The first question I ask myself is: would there be any advantage for us from having core modules written in ESM? |
6 replies
|
Note that technically, with nodejs/node#37587 (specifically this commit), part of core will effectively be ESM. |
0 replies
|
The core libs are always going to be loaded with a special loader, right? So to be precise it's going to be a special version of ESM just like it's now a special version of CommonJS, and I think most of the obstacles can be solved with some special internal logic that won't affect the userland ;) |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
A simple question with a not so simple answer: Right now all of Node.js core lib is implemented as CommonJS. It's not loaded using the same mechanisms however, we pre-compile most (if not all of it), and statically link it into the Node.js binary... so here is the key question: Is there a reasonable path forward to migrating Node.js' internal lib to ESM, either incrementally or all at once? What would be the challenges for doing so?
All reactions