Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[babel 8] Use the JSX automatic runtime by default (#12630)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com> Co-authored-by: Arun Kumar Mohan <arunmohandm@gmail.com>
- Loading branch information
1 parent
6e8250a
commit 10978bb
Showing
103 changed files
with
217 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
packages/babel-plugin-transform-classes/test/fixtures/regression/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
{ | ||
"plugins": ["external-helpers", "proposal-class-properties"], | ||
"presets": [["env", { "targets": { "browsers": "ie 6" } }], "react"] | ||
"presets": [ | ||
["env", { "targets": { "browsers": "ie 6" } }], | ||
["react", { "runtime": "classic" }] | ||
] | ||
} |
5 changes: 4 additions & 1 deletion
5
...rm-function-name/test/fixtures/function-name/export-default-arrow-renaming-3/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
{ | ||
"presets": [["env", { "targets": { "browsers": "ie 6" } }], "react"] | ||
"presets": [ | ||
["env", { "targets": { "browsers": "ie 6" } }], | ||
["react", { "runtime": "classic" }] | ||
] | ||
} |
5 changes: 4 additions & 1 deletion
5
...elements/test/fixtures/constant-elements/regression-node-type-export-default/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
{ | ||
"plugins": ["transform-react-jsx", "transform-react-constant-elements"] | ||
"plugins": [ | ||
["transform-react-jsx", { "runtime": "classic" }], | ||
"transform-react-constant-elements" | ||
] | ||
} |
5 changes: 4 additions & 1 deletion
5
...onstant-elements/test/fixtures/constant-elements/regression-node-type-export/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
{ | ||
"plugins": ["transform-react-jsx", "transform-react-constant-elements"] | ||
"plugins": [ | ||
["transform-react-jsx", { "runtime": "classic" }], | ||
"transform-react-constant-elements" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
...ransform-react-jsx/test/fixtures/pure/false-default-pragma-automatic-runtime/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"plugins": [ | ||
["transform-react-jsx", { "pure": false, "runtime": "automatic" }] | ||
] | ||
} |
3 changes: 3 additions & 0 deletions
3
...n-transform-react-jsx/test/fixtures/pure/false-default-pragma-automatic-runtime/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
var _reactJsxRuntime = require("react/jsx-runtime"); | ||
|
||
_reactJsxRuntime.jsx("div", {}); |
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
...-transform-react-jsx/test/fixtures/pure/false-default-pragma-classic-runtime/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"plugins": [ | ||
["transform-react-jsx", { "pure": false, "runtime": "classic" }] | ||
] | ||
} |
File renamed without changes.
5 changes: 0 additions & 5 deletions
5
...ges/babel-plugin-transform-react-jsx/test/fixtures/pure/false-default-pragma/options.json
This file was deleted.
Oops, something went wrong.
File renamed without changes.
6 changes: 6 additions & 0 deletions
6
...ransform-react-jsx/test/fixtures/pure/false-pragma-comment-automatic-runtime/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"plugins": [ | ||
["transform-react-jsx", { "pure": false, "runtime": "automatic" }] | ||
], | ||
"throws": "pragma and pragmaFrag cannot be set when runtime is automatic" | ||
} |
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
...-transform-react-jsx/test/fixtures/pure/false-pragma-comment-classic-runtime/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"plugins": [ | ||
["transform-react-jsx", { "pure": false, "runtime": "classic" }] | ||
] | ||
} |
File renamed without changes.
5 changes: 0 additions & 5 deletions
5
...ges/babel-plugin-transform-react-jsx/test/fixtures/pure/false-pragma-comment/options.json
This file was deleted.
Oops, something went wrong.
File renamed without changes.
6 changes: 6 additions & 0 deletions
6
...transform-react-jsx/test/fixtures/pure/false-pragma-option-automatic-runtime/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"plugins": [ | ||
["transform-react-jsx", { "pragma": "h", "pure": false, "runtime": "automatic" }] | ||
], | ||
"throws": "pragma and pragmaFrag cannot be set when runtime is automatic." | ||
} |
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
...n-transform-react-jsx/test/fixtures/pure/false-pragma-option-classic-runtime/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"plugins": [ | ||
["transform-react-jsx", { "pragma": "h", "pure": false, "runtime": "classic" }] | ||
] | ||
} |
File renamed without changes.
5 changes: 0 additions & 5 deletions
5
...ages/babel-plugin-transform-react-jsx/test/fixtures/pure/false-pragma-option/options.json
This file was deleted.
Oops, something went wrong.
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
...transform-react-jsx/test/fixtures/pure/true-default-pragma-automatic-runtime/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"plugins": [ | ||
["transform-react-jsx", { "pure": true, "runtime": "automatic" }] | ||
] | ||
} |
4 changes: 4 additions & 0 deletions
4
...in-transform-react-jsx/test/fixtures/pure/true-default-pragma-automatic-runtime/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
var _reactJsxRuntime = require("react/jsx-runtime"); | ||
|
||
/*#__PURE__*/ | ||
_reactJsxRuntime.jsx("div", {}); |
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
...n-transform-react-jsx/test/fixtures/pure/true-default-pragma-classic-runtime/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"plugins": [ | ||
["transform-react-jsx", { "pure": true, "runtime": "classic" }] | ||
] | ||
} |
File renamed without changes.
5 changes: 0 additions & 5 deletions
5
...ages/babel-plugin-transform-react-jsx/test/fixtures/pure/true-default-pragma/options.json
This file was deleted.
Oops, something went wrong.
File renamed without changes.
6 changes: 6 additions & 0 deletions
6
...transform-react-jsx/test/fixtures/pure/true-pragma-comment-automatic-runtime/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"plugins": [ | ||
["transform-react-jsx", { "pure": true, "runtime": "automatic" }] | ||
], | ||
"throws": "pragma and pragmaFrag cannot be set when runtime is automatic" | ||
} |
3 changes: 3 additions & 0 deletions
3
...lugin-transform-react-jsx/test/fixtures/pure/true-pragma-comment-classic-runtime/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/* @jsx h */ | ||
|
||
<div />; |
5 changes: 5 additions & 0 deletions
5
...n-transform-react-jsx/test/fixtures/pure/true-pragma-comment-classic-runtime/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"plugins": [ | ||
["transform-react-jsx", { "pure": true, "runtime": "classic" }] | ||
] | ||
} |
File renamed without changes.
5 changes: 0 additions & 5 deletions
5
...ages/babel-plugin-transform-react-jsx/test/fixtures/pure/true-pragma-comment/options.json
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
...ugin-transform-react-jsx/test/fixtures/pure/true-pragma-option-automatic-runtime/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<div />; |
6 changes: 6 additions & 0 deletions
6
...-transform-react-jsx/test/fixtures/pure/true-pragma-option-automatic-runtime/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"plugins": [ | ||
["transform-react-jsx", { "pragma": "h", "pure": true, "runtime": "automatic" }] | ||
], | ||
"throws": "pragma and pragmaFrag cannot be set when runtime is automatic." | ||
} |
1 change: 1 addition & 0 deletions
1
...plugin-transform-react-jsx/test/fixtures/pure/true-pragma-option-classic-runtime/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<div />; |
5 changes: 5 additions & 0 deletions
5
...in-transform-react-jsx/test/fixtures/pure/true-pragma-option-classic-runtime/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"plugins": [ | ||
["transform-react-jsx", { "pragma": "h", "pure": true, "runtime": "classic" }] | ||
] | ||
} |
File renamed without changes.
5 changes: 0 additions & 5 deletions
5
packages/babel-plugin-transform-react-jsx/test/fixtures/pure/true-pragma-option/options.json
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
...in-transform-react-jsx/test/fixtures/pure/unset-default-pragma-automatic-runtime/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<div />; |
5 changes: 5 additions & 0 deletions
5
...ransform-react-jsx/test/fixtures/pure/unset-default-pragma-automatic-runtime/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"plugins": [ | ||
["transform-react-jsx", { "runtime": "automatic" }] | ||
] | ||
} |
4 changes: 4 additions & 0 deletions
4
...n-transform-react-jsx/test/fixtures/pure/unset-default-pragma-automatic-runtime/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
var _reactJsxRuntime = require("react/jsx-runtime"); | ||
|
||
/*#__PURE__*/ | ||
_reactJsxRuntime.jsx("div", {}); |
1 change: 1 addition & 0 deletions
1
...ugin-transform-react-jsx/test/fixtures/pure/unset-default-pragma-classic-runtime/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<div />; |
5 changes: 5 additions & 0 deletions
5
...-transform-react-jsx/test/fixtures/pure/unset-default-pragma-classic-runtime/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"plugins": [ | ||
["transform-react-jsx", { "runtime": "classic" }] | ||
] | ||
} |
File renamed without changes.
5 changes: 0 additions & 5 deletions
5
...ges/babel-plugin-transform-react-jsx/test/fixtures/pure/unset-default-pragma/options.json
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
...in-transform-react-jsx/test/fixtures/pure/unset-pragma-comment-automatic-runtime/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/* @jsx h */ | ||
|
||
<div />; |
6 changes: 6 additions & 0 deletions
6
...ransform-react-jsx/test/fixtures/pure/unset-pragma-comment-automatic-runtime/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"plugins": [ | ||
["transform-react-jsx", { "runtime": "automatic" }] | ||
], | ||
"throws": "pragma and pragmaFrag cannot be set when runtime is automatic" | ||
} |
3 changes: 3 additions & 0 deletions
3
...ugin-transform-react-jsx/test/fixtures/pure/unset-pragma-comment-classic-runtime/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/* @jsx h */ | ||
|
||
<div />; |
5 changes: 5 additions & 0 deletions
5
...-transform-react-jsx/test/fixtures/pure/unset-pragma-comment-classic-runtime/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"plugins": [ | ||
["transform-react-jsx", { "runtime": "classic" }] | ||
] | ||
} |
File renamed without changes.
5 changes: 0 additions & 5 deletions
5
...ges/babel-plugin-transform-react-jsx/test/fixtures/pure/unset-pragma-comment/options.json
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
...gin-transform-react-jsx/test/fixtures/pure/unset-pragma-option-automatic-runtime/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<div />; |
6 changes: 6 additions & 0 deletions
6
...transform-react-jsx/test/fixtures/pure/unset-pragma-option-automatic-runtime/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"plugins": [ | ||
["transform-react-jsx", { "pragma": "h", "runtime": "automatic" }] | ||
], | ||
"throws": "pragma and pragmaFrag cannot be set when runtime is automatic." | ||
} |
1 change: 1 addition & 0 deletions
1
...lugin-transform-react-jsx/test/fixtures/pure/unset-pragma-option-classic-runtime/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<div />; |
5 changes: 5 additions & 0 deletions
5
...n-transform-react-jsx/test/fixtures/pure/unset-pragma-option-classic-runtime/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"plugins": [ | ||
["transform-react-jsx", { "pragma": "h", "runtime": "classic" }] | ||
] | ||
} |
File renamed without changes.
5 changes: 0 additions & 5 deletions
5
...ages/babel-plugin-transform-react-jsx/test/fixtures/pure/unset-pragma-option/options.json
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...ct-jsx/test/fixtures/react/honor-custom-jsx-comment-if-jsx-pragma-option-set/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"plugins": [["transform-react-jsx", { "pragma": "foo.bar" }]] | ||
"plugins": [["transform-react-jsx", { "pragma": "foo.bar", "runtime": "classic" }]] | ||
} |
2 changes: 1 addition & 1 deletion
2
...lugin-transform-react-jsx/test/fixtures/react/honor-custom-jsx-pragma-option/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"plugins": [["transform-react-jsx", { "pragma": "dom" }]] | ||
"plugins": [["transform-react-jsx", { "pragma": "dom", "runtime": "classic" }]] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
...s/babel-plugin-transform-react-jsx/test/fixtures/react/should-add-quotes-es3/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
{ | ||
"plugins": ["transform-react-jsx", "transform-property-literals"] | ||
"plugins": [ | ||
["transform-react-jsx", { "runtime": "classic" }], | ||
"transform-property-literals" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
"transform-react-jsx", | ||
{ | ||
"pragma": "h", | ||
"runtime": "classic", | ||
"throwIfNamespace": false | ||
} | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
"transform-react-jsx", | ||
{ | ||
"pragma": "h", | ||
"runtime": "classic", | ||
"throwIfNamespace": true | ||
} | ||
] | ||
|
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
...m-react-jsx/test/fixtures/regression/pragma-frag-set-default-classic-runtime/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"plugins": [ | ||
["transform-react-jsx", { "runtime": "classic" }] | ||
] | ||
} |
File renamed without changes.
5 changes: 0 additions & 5 deletions
5
...-plugin-transform-react-jsx/test/fixtures/regression/pragma-frag-set-default/options.json
This file was deleted.
Oops, something went wrong.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
.../runtime/defaults-to-classic/options.json → ...untime/defaults-to-automatic/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"BABEL_8_BREAKING": true, | ||
"plugins": ["transform-react-jsx"] | ||
} |
5 changes: 5 additions & 0 deletions
5
...es/babel-plugin-transform-react-jsx/test/fixtures/runtime/defaults-to-automatic/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
var _reactJsxRuntime = require("react/jsx-runtime"); | ||
|
||
var x = /*#__PURE__*/_reactJsxRuntime.jsx("div", { | ||
children: /*#__PURE__*/_reactJsxRuntime.jsx("span", {}) | ||
}); |
1 change: 1 addition & 0 deletions
1
...bel-plugin-transform-react-jsx/test/fixtures/runtime/defaults-to-classis-babel-7/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var x = (<div><span /></div>); |
4 changes: 4 additions & 0 deletions
4
...plugin-transform-react-jsx/test/fixtures/runtime/defaults-to-classis-babel-7/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"BABEL_8_BREAKING": false, | ||
"plugins": ["transform-react-jsx"] | ||
} |
File renamed without changes.
9 changes: 5 additions & 4 deletions
9
...transform-react-jsx/test/fixtures/spread-transform/transform-to-babel-extend/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"plugins": ["transform-react-jsx", ["proposal-object-rest-spread", { | ||
"loose": true, | ||
"useBuiltIns": false | ||
}], "external-helpers"] | ||
"plugins": [ | ||
["transform-react-jsx", { "runtime": "classic" }], | ||
["proposal-object-rest-spread", { "loose": true, "useBuiltIns": false }], | ||
"external-helpers" | ||
] | ||
} |
4 changes: 3 additions & 1 deletion
4
...n-transform-react-jsx/test/fixtures/spread-transform/transform-to-object-assign/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
var div = /*#__PURE__*/React.createElement(Component, Object.assign({}, props, { | ||
var _reactJsxRuntime = require("react/jsx-runtime"); | ||
|
||
var div = /*#__PURE__*/_reactJsxRuntime.jsx(Component, Object.assign({}, props, { | ||
foo: "bar" | ||
})); |
Oops, something went wrong.