Template with boilerplate for a pure ESM package in TypeScript; inspired by this gist.
I made this template because I wanted a clean starting point for my TypeScript packages without bloated & unnessasary configurations.
The aim of this template is be to pure ESM. However, if you do need to support CommonJS you can use the example package file: package.cjs.json
Warning: This package is native ESM and doesn't provide a CommonJS export. If your project uses CommonJS, you'll have to convert to ESM or use the dynamic import() function. |
---|