Skip to content

Commit bc757c8

Browse files
malbernazhzoo
authored andcommitted
passes the jsxPragma options from preset-typescript to plugin-transform-typescript (babel#7990)
1 parent c558ded commit bc757c8

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

packages/babel-preset-typescript/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff 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
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { declare } from "@babel/helper-plugin-utils";
22
import 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
});

0 commit comments

Comments
 (0)