Skip to content

Commit

Permalink
docs: regenerator-runtime dependency for swc (TypeStrong#1508)
Browse files Browse the repository at this point in the history
  • Loading branch information
petercoulton authored Oct 11, 2021
1 parent 1cc91d9 commit 63687f9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions website/docs/transpilers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand All @@ -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

Expand Down

0 comments on commit 63687f9

Please sign in to comment.