4 ms·
As someone who only dabbles in JS, one problem is that ESM makes polyfills impossible. And polyfills are mandatory in the JS ecosystem. It's quite meaningful f
by o11c 2y ago
As someone who only dabbles in JS, one problem is that ESM makes polyfills impossible. And polyfills are mandatory in the JS ecosystem.
It's quite meaningful for dependencies to be fetched asynchronously, but sometimes you really need something to be executed in the order it's written.
- norman784 2y agoI would argue that polyfills are not needed anymore, you are safe using ES2022 or even ES2023.
- tracker1 2y agoMostly agree with the above, outside some ES3-ish scripting environments (Adobe and others), polyfills for a lot of functionality isn't needed strictly for JS support. And even then, can still be part of bundling or shimmed outside your application script(s). And if you're bundling, then you can add them into the process. I've been avoiding most things that could require a polyfill since 2018 or so anyway as green browsers are pretty feature complete. As much as I'd like the F# style pipelines, and there are a couple other niceties, I don't miss much.
- Sephr 2y agoPolyfills are often necessary because new features are still added to the standard library, and runtimes all have varying levels of support for new features.
- dbalatero 2y agoFalse, I just added one the other day for the scheduler API.