Has npm ever talked about how many packages are published as ESM versus CommonJS? How many packages are dual published?
12 replies
@zachleat a good starting point: https://github.com/wooorm/npm-esm-vs-cjs
@jaredwhite @tmcw @zachleat I can imagine swathes among that “high-impact packages” dataset will not derive any benefit from switching over. As long as *I* can write and publish ESM…
oooh https://github.com/wooorm/npm-esm-vs-cjs from @wooorm looks to be an attempt at answering this!
@zachleat Not that I can recall. But there is this: https://mastodon.social/@wooorm/111454830247362464
@rauschma yeah, very useful! Thanks!
@zachleat I'd also be interested in whether UMD is still a thing? Strictly, you wouldn't need it anymore. I appreciated that kind of module in the pre-ESM era, as it worked in CommonJS as well as in the browser via script tag and even in the legacy requirejs AMD module system. (I've never used AMD though)