Skip to content

Commit f52cde9

Browse files
38elementsdevelopit
authored andcommitted
Add the configures for Babel 7 (#246)
1 parent d9501dc commit f52cde9

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

content/guide/getting-started.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Instead of declaring the `@jsx` pragma in your code, it's best to configure it g
5858
> { "jsxPragma": "h" }
5959
> ```
6060
>
61-
> **For Babel 6 and 7:**
61+
> **For Babel 6:**
6262
>
6363
> ```json
6464
> {
@@ -67,6 +67,16 @@ Instead of declaring the `@jsx` pragma in your code, it's best to configure it g
6767
> ]
6868
> }
6969
> ```
70+
>
71+
> **For Babel 7:**
72+
>
73+
> ```json
74+
> {
75+
> "plugins": [
76+
> ["@babel/plugin-transform-react-jsx", { "pragma":"h" }]
77+
> ]
78+
> }
79+
> ```
7080
7181
**Default:**
7282
>**For Babel 5 and prior:**
@@ -75,7 +85,7 @@ Instead of declaring the `@jsx` pragma in your code, it's best to configure it g
7585
> { "jsxPragma": "preact.h" }
7686
> ```
7787
>
78-
> **For Babel 6 and 7:**
88+
> **For Babel 6:**
7989
>
8090
> ```json
8191
> {
@@ -84,6 +94,16 @@ Instead of declaring the `@jsx` pragma in your code, it's best to configure it g
8494
> ]
8595
> }
8696
> ```
97+
>
98+
> **For Babel 7:**
99+
>
100+
> ```json
101+
> {
102+
> "plugins": [
103+
> ["@babel/plugin-transform-react-jsx", { "pragma":"preact.h" }]
104+
> ]
105+
> }
106+
> ```
87107
88108
---
89109

0 commit comments

Comments
 (0)