Creating a react library, why bundle to ESM?

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

Our great sponsors
  • SurveyJS - A Non-Cloud Alternative to Google Forms that has it all.
  • Amplication - open-source Node.js backend code generator
  • Appwrite - The open-source backend cloud platform
  • Mergify - Updating dependencies is time-consuming.
  • InfluxDB - Collect and Analyze Billions of Data Points in Real Time
  • Sonar - Write Clean JavaScript Code. Always.
  • Microbundle

    📦 Zero-configuration bundler for tiny modules.

    I would recommend starting by using , 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 . The CJS/ESM output is generated by just running Babel directly on the source files and outputting them individually.

  • SurveyJS

    A Non-Cloud Alternative to Google Forms that has it all.. SurveyJS JavaScript libraries allow you to easily set up a robust form management system fully integrated into your IT infrastructure where users can create and edit multiple dynamic JSON-based forms in a no-code form builder. Learn more now.

  • 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

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