项目作者: antfu

项目描述 :
Transpile TypeScript to ESM with Node.js loader.
高级语言: JavaScript
项目地址: git://github.com/antfu/esbuild-node-loader.git
创建时间: 2021-06-06T15:59:18Z
项目社区:https://github.com/antfu/esbuild-node-loader

开源协议:MIT License

下载


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

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

Or use with esmo:

  1. npx esmo file.ts

Sponsors





License

MIT License © 2021 Anthony Fu