This package has been deprecated

Author message:

This package will no longer be maintained, Please use 'tsx' instead

swcr

2.0.0 • Public • Published

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

License

MIT

Package Sidebar

Install

npm i swcr

Weekly Downloads

5

Version

2.0.0

License

MIT

Unpacked Size

197 kB

Total Files

6

Last publish

Collaborators

  • fz6m