This PR turns the library from a CommonJS module into an ES module.
All the require/exports have been replaced with import/export. Rollup has replaced browserify to generate browser builds.
The new build system produces three outputs:
- doip.core.js: the doip-js library without fetchers
- doip.fetchers.js: the fetchers doip-js needs to fetch proofs
- doip.fetchers.minimal.js: the fetchers only used in browsers (missing fetchers: DNS, XMPP, IRC)
Skipping DNS, XMPP and IRC allows the minimal variant to be 700+ kB lighter than the full variant (92 kB vs 835 kB). All sizes are before minification.
This PR turns the library from a CommonJS module into an ES module.
All the require/exports have been replaced with import/export. Rollup has replaced browserify to generate browser builds.
The new build system produces three outputs:
- doip.core.js: the doip-js library without fetchers
- doip.fetchers.js: the fetchers doip-js needs to fetch proofs
- doip.fetchers.minimal.js: the fetchers only used in browsers (missing fetchers: DNS, XMPP, IRC)
Skipping DNS, XMPP and IRC allows the minimal variant to be 700+ kB lighter than the full variant (92 kB vs 835 kB). All sizes are before minification.