From e860da63f49ca6d490ce6ce5d4a829837c54977b Mon Sep 17 00:00:00 2001 From: Jacek Tomaszewski Date: Thu, 6 Nov 2025 16:15:23 +0100 Subject: [PATCH] Add SWC configuration example for JSX/TSX Added example configuration for SWC to compile JSX and TSX files. --- content/recipes/swc.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/content/recipes/swc.md b/content/recipes/swc.md index 8fe8c3e9..5a178002 100644 --- a/content/recipes/swc.md +++ b/content/recipes/swc.md @@ -49,6 +49,20 @@ To customize builder's behavior, you can pass an object containing two attribute } ``` +For example, to make the swc compile `.jsx` and `.tsx` files, do: + +```json +{ + "compilerOptions": { + "builder": { + "type": "swc", + "options": { "extensions": [".ts", ".tsx", ".js", ".jsx"] } + }, + } +} + +``` + To run the application in watch mode, use the following command: ```bash