You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
With growing support of ESM in all tooling now maintaining CJS builds seems not necessary anymore.
Describe the solution you'd like
We can simply remove the support for CJS builds and it will cleanup the lib/cjs directory.
Need to remove package.json scripts
Bump the version to breaking change
Update the main fields for the package.json
Additional context
Dropping CommonJS (CJS) support in favor of ECMAScript Modules (ESM) offers several advantages:
Modern Standard: ESM is the official JavaScript module standard, ensuring better future compatibility and native support in Node.js and browsers.
Improved Performance: ESM allows for static analysis, tree-shaking, and better optimization during bundling, resulting in smaller and faster builds.
Simplified Codebase: Maintaining only ESM reduces build complexity, configuration overhead, and maintenance effort.
Better Interoperability: ESM integrates smoothly with modern tooling, packages, and web platforms, improving developer experience and ecosystem alignment.
Future-Proofing: The JavaScript ecosystem is moving toward ESM, and deprecating CJS ensures alignment with evolving best practices.
The text was updated successfully, but these errors were encountered:
nazarhussain
changed the title
Remove the CJS support
Stop supporting CommonJS builds
Jan 16, 2025
Is your feature request related to a problem? Please describe.
With growing support of ESM in all tooling now maintaining CJS builds seems not necessary anymore.
Describe the solution you'd like
We can simply remove the support for CJS builds and it will cleanup the
lib/cjs
directory.main
fields for thepackage.json
Additional context
Dropping CommonJS (CJS) support in favor of ECMAScript Modules (ESM) offers several advantages:
The text was updated successfully, but these errors were encountered: