File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
packages/babel-preset-typescript Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -53,3 +53,13 @@ require("@babel/core").transform("code", {
5353 presets: [" @babel/preset-typescript" ]
5454});
5555```
56+
57+ ## Options
58+
59+ ### ` jsxPragma `
60+
61+ ` string `
62+
63+ Replace the function used when compiling JSX expressions.
64+
65+ This is so that we know that the import is not a type import, and should not be removed
Original file line number Diff line number Diff line change 11import { declare } from "@babel/helper-plugin-utils" ;
22import transformTypeScript from "@babel/plugin-transform-typescript" ;
33
4- export default declare ( api => {
4+ export default declare ( ( api , { jsxPragma } ) => {
55 api . assertVersion ( 7 ) ;
66
77 return {
8- plugins : [ transformTypeScript ] ,
8+ plugins : [ [ transformTypeScript , { jsxPragma } ] ] ,
99 } ;
1010} ) ;
You can’t perform that action at this time.
0 commit comments