Skip to content

Commit c6823b3

Browse files
committed
update readme
1 parent b3c9a55 commit c6823b3

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,26 @@ npm i -D swc-plugin-vue-jsx
1111

1212
## Configuration
1313

14+
You can configure your `.swcrc` file.
15+
16+
### Minimum Config
17+
18+
```json
19+
{
20+
"jsc": {
21+
"parser": {
22+
"syntax": "ecmascript",
23+
"jsx": true
24+
},
25+
"experimental": {
26+
"plugins": [["swc-plugin-vue-jsx", {}]]
27+
}
28+
}
29+
}
30+
```
31+
32+
### Options
33+
1434
These options of official Babel plugin are supported:
1535

1636
- `transformOn`
@@ -39,6 +59,30 @@ For example:
3959

4060
All HTML tags which match the pattern `^i-` will be treated as custom elements.
4161

62+
### Advanced Config Example
63+
64+
```json
65+
{
66+
"jsc": {
67+
"parser": {
68+
"syntax": "ecmascript",
69+
"jsx": true
70+
},
71+
"experimental": {
72+
"plugins": [
73+
[
74+
"swc-plugin-vue-jsx",
75+
{
76+
"transformOn": true,
77+
"optimize": true
78+
}
79+
]
80+
]
81+
}
82+
}
83+
}
84+
```
85+
4286
## Limitation
4387

4488
`v-models` isn't supported.

0 commit comments

Comments
 (0)