3 ms·
The browsers would never implement it.
by recursive 2y ago
The browsers would never implement it.
- efilife 2y agoThis is not a talk about browsers, hence the readFileSync examples
- recursive 2y agoThe reason we got here in the first place was trying to standardize the language and its module loading. If you come up with a solution that doesn't work in browsers, we're back to the same thing. Instead of the `require()` polyfill, we'd need the `importSync` polyfill.
- tqwhite 2y agoNor do they have require(). That’s not the point.
- recursive 2y agoAnd the fact that require() is non-standard is why we're talking about ESM now. Node can cook up another non-standard package loading thing whenever they want. It just won't be ESM. And if you don't care what browsers do, then we're not talking about ESM.