1.2.0 • Published 5 years ago
@jonaslideen/esbuild-register v1.2.0
esbuild-register
Install
yarn add esm esbuild-register --devYou need esm as well because esbuild doesn't compile import and export statements to commonjs require.
esbuild is also required as a peer dependency.
Usage
node -r esm -r esbuild-register file.tsIt will use jsxFactory, jsxFragmentFactory and target options from your tsconfig.json
When using Yarn, you can add an npm script:
"ts": "node -r esm -r esbuild-register"to shorten the command, now just run yarn ts file.ts instead.
License
MIT © EGOIST (Kevin Titor)
1.2.0
5 years ago