Yeah making file extensions mandatory is pretty great for performance. I once profiled parcel on a pretty large app and it did something like 500,000 fs.stat calls in its resolver checking for various file extensions. I’m glad they are optimizing the resolution algorithm a bit.
-
-
-
Rome has an in-memory file system so extension lookups aren't that big of a deal. I don't think fs perf is really something they care about compared to aligning with the web though.
- 3 more replies
New conversation -
-
-
When do you think most library authors will/should switch to only shipping esm? October is not far off for LTS and the experimental flag should go away then

-
Probably wont be for a while. Will be good for bundlers/compilers to support the Node semantics before October. Compiling still completely to CJS. Then once the semantics and new Node version is ubiquitous then everyone can start publishing raw ESM.
- 1 more reply
New conversation -
-
-
I think the key is a "standard Node" mode across tools that 1) doesn't allow `import` of CJS, 2) understands createRequire() and 3) implements the more limited resolution of import specifiers. Might be tricky if tools will push back against change or try to merge JS & CJS modes.
-
Why #1? Do you dislike importing CJS as ESM?
- 1 more reply
New conversation -
-
-
In your mind, x months/years/however-long from now, after as you describe, a brutal migration, most everything is on Node ESM, what do you see as making it all “worth it” that wouldn’t have been possible w/require already (given even tree shaking w/require impls out there now)
-
I have many laments about these many years of js modules. But node & every one else sharing common expectations is a very good thing. I have reservations about esm but damn am I happy to
#JsTogether.#NodeFwd - 1 more reply
New conversation -
-
-
Thanks this is quite a bit different than I would have assumed
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 