Post

CommonJS is soooo painful. I'm genuinely mad at the inability of big tech companies to provide high quality JS libraries in a modern format.

Facebook ships react-dom/client as CJS despite being a browser-only library. If it was distributed as ESM I could import it directly in the browser but I need an intermediate build step because they haven't figured out IN 8 YEARS how to produce ESM from their ESM-like source files.

0 reposts2 likes

Google's googleapis is a giant 10 MB blob of CJS that does not properly tree-shake and therefore cannot be used on Cloudflare Workers because it's too damn big.