mirror of
https://github.com/hanzoai/ts-node.git
synced 2026-10-30 19:36:25 +00:00
* Fix "esm" jsdoc * categorize typedocs; exclude jsonschema tags from typedoc * Resolve #1607: explain common ESM errors in troubleshooting page * improve dark theme contrast * Fix amendment to typedoc categories * big docs overhaul * changes to cater to our readme rendering script * lint-fix * final fixes
798 B
798 B
title
| title |
|---|
| SWC |
SWC support is built-in via the --swc flag or "swc": true tsconfig option.
SWC is a TypeScript-compatible transpiler implemented in Rust. This makes it an order of magnitude faster than vanilla transpileOnly.
To use it, first install @swc/core or @swc/wasm. If using importHelpers, also install @swc/helpers. If target is less than "es2015" and using async/await or generator functions, also install regenerator-runtime.
npm i -D @swc/core @swc/helpers regenerator-runtime
Then add the following to your tsconfig.json.
{
"ts-node": {
"swc": true
}
}
SWC uses
@swc/helpersinstead oftslib. If you have enabledimportHelpers, you must also install@swc/helpers.