From 63687f94f4ec14784025f9e2001082d3d928c022 Mon Sep 17 00:00:00 2001 From: Peter Coulton Date: Mon, 11 Oct 2021 20:56:35 +0100 Subject: [PATCH 1/3] docs: regenerator-runtime dependency for swc (#1508) --- website/docs/transpilers.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/website/docs/transpilers.md b/website/docs/transpilers.md index 6343a61ef..cd29fb35a 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`, and if using `dynamicImports` 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`. @@ -38,6 +38,7 @@ Then add the following to your `tsconfig.json`. ``` > `swc` uses `@swc/helpers` instead of `tslib`. If you have enabled `importHelpers`, you must also install `@swc/helpers`. +> If you are using `dynamicImports`, you must install `regenerator-runtime`. ## Writing your own integration From 9481d96c20eee887be53db76983e4061716d1344 Mon Sep 17 00:00:00 2001 From: Peter Coulton Date: Wed, 13 Oct 2021 12:22:46 +0100 Subject: [PATCH 2/3] docs(transpilers): update advice for installing regenerator-runtime --- website/docs/transpilers.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/website/docs/transpilers.md b/website/docs/transpilers.md index cd29fb35a..63c537def 100644 --- a/website/docs/transpilers.md +++ b/website/docs/transpilers.md @@ -20,7 +20,7 @@ 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`, and if using `dynamicImports` also install `regenerator-runtime`. +To use it, first install `@swc/core` or `@swc/wasm`, and `regenerator-runtime` which `swc` requires for `async`/`await` support. If using `importHelpers`, also install `@swc/helpers` ```shell npm i -D @swc/core @swc/helpers regenerator-runtime @@ -38,7 +38,6 @@ Then add the following to your `tsconfig.json`. ``` > `swc` uses `@swc/helpers` instead of `tslib`. If you have enabled `importHelpers`, you must also install `@swc/helpers`. -> If you are using `dynamicImports`, you must install `regenerator-runtime`. ## Writing your own integration From a2ca063b27fafedea8b0b19336f22e261dece6e7 Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Sun, 17 Oct 2021 18:38:01 -0400 Subject: [PATCH 3/3] Update transpilers.md --- website/docs/transpilers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/transpilers.md b/website/docs/transpilers.md index 63c537def..eb80fd11f 100644 --- a/website/docs/transpilers.md +++ b/website/docs/transpilers.md @@ -20,7 +20,7 @@ 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`, and `regenerator-runtime` which `swc` requires for `async`/`await` support. 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 regenerator-runtime