From ccf8c8e11becb475c15d3579a2ab290c28808e90 Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Fri, 22 Oct 2021 15:01:26 -0400 Subject: [PATCH] Docs merge for 10.3.2 (#1530) * Fix inconsistent reference to ts-node in docs * docs: regenerator-runtime dependency for swc (#1508) (#1509) * docs: regenerator-runtime dependency for swc (#1508) * docs(transpilers): update advice for installing regenerator-runtime * Update transpilers.md Co-authored-by: Andrew Bradley Co-authored-by: Peter Coulton --- website/docs/installation.md | 2 +- website/docs/transpilers.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/website/docs/installation.md b/website/docs/installation.md index 4b22d54d3..541434b49 100644 --- a/website/docs/installation.md +++ b/website/docs/installation.md @@ -15,4 +15,4 @@ npm install -g ts-node npm install -D tslib @types/node ``` -**Tip:** Installing modules locally allows you to control and share the versions through `package.json`. TS Node will always resolve the compiler from `cwd` before checking relative to its own installation. +**Tip:** Installing modules locally allows you to control and share the versions through `package.json`. ts-node will always resolve the compiler from `cwd` before checking relative to its own installation. diff --git a/website/docs/transpilers.md b/website/docs/transpilers.md index 6343a61ef..eb80fd11f 100644 --- a/website/docs/transpilers.md +++ b/website/docs/transpilers.md @@ -20,10 +20,10 @@ We have bundled an experimental `swc` integration. [`swc`](https://swc.rs) is a TypeScript-compatible transpiler implemented in Rust. This makes it an order of magnitude faster than `transpileModule`. -To use it, first install `@swc/core` or `@swc/wasm`. If using `importHelpers`, also install `@swc/helpers`. +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 either `async`/`await` or generator functions, also install `regenerator-runtime`. ```shell -npm i -D @swc/core @swc/helpers +npm i -D @swc/core @swc/helpers regenerator-runtime ``` Then add the following to your `tsconfig.json`.