Creating a react library, why bundle to ESM?

This page summarizes the projects mentioned and recommended in the original post on reddit.com/r/reactjs

Our great sponsors
  • Appwrite - The Open Source Firebase alternative introduces iOS support
  • SonarLint - Deliver Cleaner and Safer Code - Right in Your IDE of Choice!
  • Scout APM - Less time debugging, more time building
  • Microbundle

    📦 Zero-configuration bundler for tiny modules.

    I would recommend starting by using https://github.com/developit/microbundle , as it has pretty good default behavior for generating library output.

  • react-bootstrap

    Bootstrap components built with React

    Huh. Looking at the build script for react-bootstrap on the bs4-dev branch, they are using Webpack... but it looks like it's just to build the UMD bundles like https://unpkg.com/browse/react-bootstrap@2.0.3/dist/react-bootstrap.js . The CJS/ESM output is generated by just running Babel directly on the source files and outputting them individually.

  • Appwrite

    Appwrite - The Open Source Firebase alternative introduces iOS support . Appwrite is an open source backend server that helps you build native iOS applications much faster with realtime APIs for authentication, databases, files storage, cloud functions and much more!

  • react-menu

    React component for building accessible menu, dropdown, submenu, context menu and more.

    You could have a look what I'm shipping for my library https://github.com/szhsin/react-menu/tree/master/dist

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts