Closed davidstrahm closed 11 months ago
Technically my module is in UMD, since I wanted it to work both as a regular script import and in Node. But you're correct, providing an additional build in ESM provides additional benefits, such as tree-shakability. I also personally prefer ESM, but decided to author my library in CJS for maximum compatibility.
I'll look into how to author this lib in both formats!
Included a native ESM bundle in the latest version, please verify!
This package causes warnings in Angular compiler because it uses commonJs modules instead of ESM modules, also, its not treeshakeable.
See: https://gist.github.com/aelbore/65a4d2e86c3326f36607db111a7b6887