Skip to content

Commit 6ee930b

Browse files
Merge pull request #3344 from jtomaszewski/patch-2
docs: Add SWC configuration example for JSX/TSX
2 parents ec8d0b1 + e860da6 commit 6ee930b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

content/recipes/swc.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,20 @@ To customize builder's behavior, you can pass an object containing two attribute
4949
}
5050
```
5151

52+
For example, to make the swc compile `.jsx` and `.tsx` files, do:
53+
54+
```json
55+
{
56+
"compilerOptions": {
57+
"builder": {
58+
"type": "swc",
59+
"options": { "extensions": [".ts", ".tsx", ".js", ".jsx"] }
60+
},
61+
}
62+
}
63+
64+
```
65+
5266
To run the application in watch mode, use the following command:
5367

5468
```bash

0 commit comments

Comments
 (0)