Minimal #TypeScript setup (ESM):
– Bundling via esbuild
– Unit tests via:

"scripts": {
"test": "mocha --loader=tsx --ui qunit",
"testall": "mocha --loader=tsx --ui qunit \"./src/**/*_test.ts\""
},

https://github.com/esbuild-kit/tsx

Being able to run the TS tests directly (vs. their JS versions) is nice.

It looks like TSX internally uses source maps because stack traces have the correct line numbers and point to TS files.

GitHub - esbuild-kit/tsx: ⚡️ TypeScript Execute (tsx): Node.js enhanced with esbuild to run TypeScript & ESM

⚡️ TypeScript Execute (tsx): Node.js enhanced with esbuild to run TypeScript & ESM - GitHub - esbuild-kit/tsx: ⚡️ TypeScript Execute (tsx): Node.js enhanced with esbuild to run TypeScript &...

GitHub