2.0.0 • Published 2 years ago
swcr v2.0.0
swcr
Swc register for node.js. Efficient typescript runtime.
Install
npm i -D swcr @swc/core
# or
yarn add -D swcr @swc/core
# or
pnpm add -D swcr @swc/core
Usage
node -r swcr file.ts
You can custom jsxFactory
, jsxFragmentFactory
, target
in your tsconfig.json
.
Methods
const { register } = require('swcr/dist/node')
const { unregister } = register({
// ...options
})
// Unregister the require hook if you don't need it anymore
unregister()
Thanks/Inspiration
- esbuild-register - This project most ideas are based on esbuild-register.
License
MIT