Skip to content

Commit 8e40520

Browse files
docs: update swc (custom swcrc) and cli docs (builder opts)
1 parent e885a0d commit 8e40520

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

content/cli/workspaces.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ These properties specify the compiler to use as well as various options that aff
192192
| `assets` | array | Enables automatically distributing non-TypeScript assets whenever a compilation step begins (asset distribution does **not** happen on incremental compiles in `--watch` mode). See below for details. |
193193
| `watchAssets` | boolean | If `true`, run in watch-mode, watching **all** non-TypeScript assets. (For more fine-grained control of the assets to watch, see [Assets](cli/monorepo#assets) section below). |
194194
| `manualRestart` | boolean | If `true`, enables the shortcut `rs` to manually restart the server. Default value is `false`. |
195-
| `builder` | string | Instructs CLI on what `builder` to use to compile the project (`tsc`, `swc`, or `webpack`) |
195+
| `builder` | string/object | Instructs CLI on what `builder` to use to compile the project (`tsc`, `swc`, or `webpack`). To customize builder's behavior, you can pass an object containing two attributes: `type` (`tsc`, `swc`, or `webpack`) and `options`. |
196196
| `typeCheck` | boolean | If `true`, enables type checking for SWC-driven projects (when `builder` is `swc`). Default value is `false`. |
197197

198198
#### Global generate options

content/recipes/swc.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,19 @@ Instead of passing the `-b` flag you can also just set the `compilerOptions.buil
3434
}
3535
```
3636

37+
To customize builder's behavior, you can pass an object containing two attributes, `type` (`"swc"`) and `options`, as follows:
38+
39+
```json
40+
"compilerOptions": {
41+
"builder": {
42+
"type": "swc",
43+
"options": {
44+
"swcrcPath": "infrastructure/.swcrc",
45+
}
46+
}
47+
}
48+
```
49+
3750
To run the application in watch mode, use the following command:
3851

3952
```bash

src/app/homepage/pages/cli/cli.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const routes: Routes = [
2020
path: 'monorepo',
2121
component: CliWorkspacesComponent,
2222
data: {
23-
title: 'Monorepo - CLI',
23+
title: 'Workspaces - CLI',
2424
},
2525
},
2626
{

0 commit comments

Comments
 (0)