Skip to content

Commit 5503e5d

Browse files
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 <cspotcode@gmail.com>
1 parent 261b7b9 commit 5503e5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

website/docs/transpilers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ We have bundled an experimental `swc` integration.
2020
[`swc`](https://swc.rs) is a TypeScript-compatible transpiler implemented in Rust. This makes it an order of magnitude faster
2121
than `transpileModule`.
2222

23-
To use it, first install `@swc/core` or `@swc/wasm`. If using `importHelpers`, also install `@swc/helpers`.
23+
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`.
2424

2525
```shell
26-
npm i -D @swc/core @swc/helpers
26+
npm i -D @swc/core @swc/helpers regenerator-runtime
2727
```
2828

2929
Then add the following to your `tsconfig.json`.

0 commit comments

Comments
 (0)