Deprecated. This package has been moved to https://github.com/esbuild-kit/esm-loader
Transpile TypeScript to ESM with Node.js loader hooks on the fly.
Inspired by esbuild-register
but for Node.js ESM instead of CJS.
- Supports
.ts
,.tsx
and.json
- Support extension also resolving (can import modules without extension)
npm i esbuild-node-loader -D
node --experimental-loader esbuild-node-loader file.ts
Or use with esmo:
npx esmo file.ts
MIT License ยฉ 2021 Anthony Fu