Updates package.js to export both ESM and CommonJS exports.
Not everyone has migrated to ESM yet (including some big frameworks), and this allows this package to be used by consumers using both module types.
The build process stays the same, just run rpm run build, and it will build both ESM and CJS versions and place them in build/esm and build/cjs, respectively. The main package.json exports will direct module systems to import/require the appropriate build.
Updates package.js to export both ESM and CommonJS exports.
Not everyone has migrated to ESM yet (including some big frameworks), and this allows this package to be used by consumers using both module types.
The build process stays the same, just run
rpm run build
, and it will build both ESM and CJS versions and place them inbuild/esm
andbuild/cjs
, respectively. The mainpackage.json
exports will direct module systems to import/require the appropriate build.