From 63687f94f4ec14784025f9e2001082d3d928c022 Mon Sep 17 00:00:00 2001 From: Peter Coulton Date: Mon, 11 Oct 2021 20:56:35 +0100 Subject: [PATCH] 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