From 261b7b992d566b1b4e5fa69351fcfd2aec8a659c Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Mon, 11 Oct 2021 21:06:40 -0400 Subject: [PATCH 1/2] Fix inconsistent reference to ts-node in docs --- website/docs/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. From 5503e5d7299dfb8a30774dc6b25285e7d3f18bd1 Mon Sep 17 00:00:00 2001 From: Peter Coulton Date: Sun, 17 Oct 2021 23:39:07 +0100 Subject: [PATCH 2/2] 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 --- website/docs/transpilers.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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`.