Same amount of time as the "use module" PR right?
-
-
Works in way that web, node, random CLI tools, OS, etc. can have same mechanism
-
The problem isn't the extension per se, but that it allows node to import CJS from modules, which is not web compatible.
-
If instead require() was for CJS and import was for modules, then modules w/o requires() would be web compatible
-
Since imported CJS won't have nice exports, the argument that allowing them to be imported improves migration seems overstated
-
Any CJS that's ported to an idiomatic module will require it's dependents to change, might as well have them change from require to import
-
Not all modules (like Node's core, meow, etc) can be ported to ESM, and putting `require` in ESM is also not web friendly :(
-
More web friendly, IMO, than an invalid import of a non-module, which is just less obviously web-incompatible
-
All imports are backed by ESM, we just do a facade layer for people.
- 10 more replies
New conversation -
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.