Building NPM packages for CommonJS with ESM dependencies
TLDR   You have to use a bundler such as esbuild which will compile your project and bundle...
Tags: javascript, typescript, npm, esm