You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/gatsby-plugin-typescript/README.md
+22Lines changed: 22 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,28 @@ module.exports = {
21
21
}
22
22
```
23
23
24
+
## Options
25
+
26
+
When adding this plugin to your `gatsby-config.js`, you can pass in options to override the default [@babel/preset-typescript](https://babeljs.io/docs/en/babel-preset-typescript#options) config.
27
+
28
+
```javascript
29
+
// gatsby-config.js
30
+
module.exports= {
31
+
plugins: [
32
+
{
33
+
resolve:`gatsby-plugin-typescript`,
34
+
options: {
35
+
isTSX:true, // defaults to false
36
+
jsxPragma:`jsx`, // defaults to "React"
37
+
allExtensions:true, // defaults to false
38
+
},
39
+
},
40
+
],
41
+
}
42
+
```
43
+
44
+
For more detailed documentation on the available options, visit https://babeljs.io/docs/en/babel-preset-typescript#options.
45
+
24
46
## Caveats
25
47
26
48
This plugin uses [`babel-plugin-transform-typescript`](https://babeljs.io/docs/en/babel-plugin-transform-typescript.html)
0 commit comments