npm i -D @db-scripts/bundle
Add this to your
This will create an ES Module build, a commonjs build, a umd build and an esnext build within a
It also will also add a
.size-snapshot.json which will tell you the size of your library including all required dependencies.
Typically you want to add these fields to your
Check out the docs for sideEffects to make sure you understand what this field implies.
The bundling process uses plain babel for the esm and commonjs builds. You can find the reasoning here.
The scripts are very heavily inspired by kcd-scripts. Thanks a lot for sharing your code Kent!