This updates the build process to use Rollup instead of tsc. The benefit of this is we now get UMD and ES Module builds in addition to the CommonJS builds we were getting before.
Most users of Fishery should see no change, as their environments will likely still use the CommonJS version that is specified in pkg.main
Some webpack or Rollup users would now import the new ES module file as specified in pkg.module if their environment supports ES modules
The new UMD file inlines all dependencies (just lodash.mergeWith and tslib) so Fishery can be loaded in non-packaged environments, including with UNPKG. Fishery is available as the global, Fishery.
Inspiration
When putting this PR together, I looked at several other repos that use Rollup to see how they work:
This updates the build process to use Rollup instead of
tsc
. The benefit of this is we now get UMD and ES Module builds in addition to the CommonJS builds we were getting before.pkg.main
pkg.module
if their environment supports ES moduleslodash.mergeWith
andtslib
) so Fishery can be loaded in non-packaged environments, including with UNPKG. Fishery is available as the global,Fishery
.Inspiration
When putting this PR together, I looked at several other repos that use Rollup to see how they work:
Closes #72