antfu / esbuild-node-loader

Transpile TypeScript to ESM with Node.js loader.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deprecated. This package has been moved to https://github.com/esbuild-kit/esm-loader


esbuild-node-loader

NPM version

Transpile TypeScript to ESM with Node.js loader hooks on the fly.

Inspired by esbuild-register but for Node.js ESM instead of CJS.

Features

  • Supports .ts, .tsx and .json
  • Support extension also resolving (can import modules without extension)

Usage

npm i esbuild-node-loader -D
node --experimental-loader esbuild-node-loader file.ts

Or use with esmo:

npx esmo file.ts

Sponsors

License

MIT License © 2021 Anthony Fu

ezoic increase your site revenue

About

Transpile TypeScript to ESM with Node.js loader.

License:MIT License


Languages

Language:JavaScript 53.8%Language:TypeScript 46.2%