esbuild-register

3.6.0 • Public • Published

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

Experimental loader support

When using in a project with type: "module" in package.json, you need the --loader flag to load TypeScript files:

node --loader esbuild-register/loader -r esbuild-register ./file.ts

Programmatic Usage

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

const { unregister } = register({
  // ...options
})

// Unregister the require hook if you don't need it anymore
unregister()

Sponsors

sponsors

License

MIT © EGOIST

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.6.02,664,217latest

Version History

VersionDownloads (Last 7 Days)Published
3.6.02,664,217
3.5.02,507,043
3.4.2274,131
3.4.14,061
3.4.0285
3.3.314,879
3.3.210,048
3.3.123
3.3.00
3.2.156
3.2.098
3.1.2119
3.1.10
3.1.03
3.0.0727
2.6.01,300
2.5.043
2.4.0149
2.3.089
2.2.10
2.2.038
2.1.00
2.0.059
1.2.15
1.2.00
1.1.11
1.1.00
1.0.22
1.0.10
1.0.00
0.0.00

Package Sidebar

Install

npm i esbuild-register

Weekly Downloads

4,540,467

Version

3.6.0

License

MIT

Unpacked Size

182 kB

Total Files

9

Last publish

Collaborators

  • egoist