Open
Description
currently, the package is a CommonJS module type.
I would love to make it a native module type (ESM).
Goal: have the dist available in multiple flavors
- ESM for browser
- commonJS for browser
- esm for node
- commonjs for node
- umd ...
- amd ...
- ... etc ...
Important to READ:
- https://nodejs.org/api/packages.html#dual-commonjses-module-packages
- maybe helps with the missing file extensions when importing: import aliases - https://nodejs.org/api/packages.html#subpath-patterns
implementation:
- use https://nodejs.org/api/packages.html#package-entry-points
- use https://nodejs.org/api/packages.html#dual-commonjses-module-packages
- have multiple TypeScript compilers and webpack runs, that generate isolated JavaScript for each purpose