## Library build process

This library exports multiple formats under the same package to support the most common use cases out of the box

- Node with common js imports (`require()`)
- Node with esm imports (`import ... from`)
- Modern Browsers
- Webpack

### Build script

Current build script relies on the following parameters passed to microbundle

- `--external axios,uuid` This not only ensures `axios` and `uuid` are not included in the build, but also ensures the rest of the dependencies are included. Most notably, there is an issue in our react example project (which uses webpack) when `globalthis` dependency is not bundled with the application that prevents webpack from building it:
  > BREAKING CHANGE: The request 'globalthis/polyfill' failed to resolve only because it was resolved as fully specified
- `-f cjs,module,umd` This explicitly tells microbundle to not create a `modern` (.mjs) file since we are not using it because it clashes with our react example project (again, something webpack may resolve later). To see more about what `modern` really does, check [this out](https://github.com/developit/microbundle#-modern-mode-)
