Skip to Content
  • Website
Codsen
  • Home
  • Open Source
  • Articles
  • About

rollup vs esbuild: iife is not umd

by Roy Revelt   ·   posted on Thursday, 19 May 2022   ·   jsts

Back in the day, before native ES Modules, UMD builds were superior to IIFE because we could unit test them.

And while Rollup and Webpack can produce UMD, esbuild can only make IIFE, so that was an argument against using the esbuild.


For npm package developers (like me) it was a huge deal.

Now, in ESM world, IIFEopens in a new tab is just as good. You can’t import neither UMD nor IIFE builds of the npm package and so, you can’t unit test them.

¯\_(ツ)_/¯

↑ back to top
older newer

Copyright

All rights reserved © Roy Revelt 2026
All our open source packages are under MIT licenceopens in a new tab

Activities

🐛 See a bug? Raise an issueopens in a new tab
💘 Check out the Indiewebopens in a new tab and Libera manifestoopens in a new tab