0.0.1 • Published 3 years ago

@angeloashmore/esbuild-register v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

esbuild-register

npm version npm downloads

Install

npm i esbuild esbuild-register -D
# Or Yarn
yarn add esbuild esbuild-register --dev
# Or pnpm
pnpm add esbuild esbuild-register -D

Usage

node -r esbuild-register file.ts

It will use jsxFactory, jsxFragmentFactory and target options from your tsconfig.json

When using Yarn, you can add an npm script:

"ts": "node -r esbuild-register"

to shorten the command, now just run yarn ts file.ts instead.

Programmatic Usage

const { register } = require('esbuild-register/dist/node')

register({
  // ...options
})

License

MIT © EGOIST w