This PR improves rollup build in order to use .cjs and .mjs. This allows to load those in different environments.
It adds exports fields to package.json to improve usage with bundlers (typescript, vite, ...).
I removed the dist folder from the repo (it should not be needed), and added prepack script, so the dist folder is automatically generated when running npm publish.
This PR improves rollup build in order to use
.cjs
and.mjs
. This allows to load those in different environments.It adds
exports
fields to package.json to improve usage with bundlers (typescript, vite, ...).I removed the
dist
folder from the repo (it should not be needed), and addedprepack
script, so the dist folder is automatically generated when runningnpm publish
.Here are some useful reports about current state: https://publint.dev/swell-js@3.22.4