[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>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-react-jsx", { "pure": false, "runtime": "automatic" }]
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
var _reactJsxRuntime = require("react/jsx-runtime");
|
||||
|
||||
_reactJsxRuntime.jsx("div", {});
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-react-jsx", { "pure": false, "runtime": "classic" }]
|
||||
]
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-react-jsx", { "pure": false }]
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-react-jsx", { "pure": false, "runtime": "automatic" }]
|
||||
],
|
||||
"throws": "pragma and pragmaFrag cannot be set when runtime is automatic"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-react-jsx", { "pure": false, "runtime": "classic" }]
|
||||
]
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-react-jsx", { "pure": false }]
|
||||
]
|
||||
}
|
||||
@@ -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."
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-react-jsx", { "pragma": "h", "pure": false, "runtime": "classic" }]
|
||||
]
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-react-jsx", { "pragma": "h", "pure": false }]
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-react-jsx", { "pure": true, "runtime": "automatic" }]
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
var _reactJsxRuntime = require("react/jsx-runtime");
|
||||
|
||||
/*#__PURE__*/
|
||||
_reactJsxRuntime.jsx("div", {});
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-react-jsx", { "pure": true, "runtime": "classic" }]
|
||||
]
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-react-jsx", { "pure": true }]
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-react-jsx", { "pure": true, "runtime": "automatic" }]
|
||||
],
|
||||
"throws": "pragma and pragmaFrag cannot be set when runtime is automatic"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
/* @jsx h */
|
||||
|
||||
<div />;
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-react-jsx", { "pure": true, "runtime": "classic" }]
|
||||
]
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-react-jsx", { "pure": true }]
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<div />;
|
||||
@@ -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."
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<div />;
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-react-jsx", { "pragma": "h", "pure": true, "runtime": "classic" }]
|
||||
]
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-react-jsx", { "pragma": "h", "pure": true }]
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<div />;
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-react-jsx", { "runtime": "automatic" }]
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
var _reactJsxRuntime = require("react/jsx-runtime");
|
||||
|
||||
/*#__PURE__*/
|
||||
_reactJsxRuntime.jsx("div", {});
|
||||
@@ -0,0 +1 @@
|
||||
<div />;
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-react-jsx", { "runtime": "classic" }]
|
||||
]
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-react-jsx", {}]
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
/* @jsx h */
|
||||
|
||||
<div />;
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-react-jsx", { "runtime": "automatic" }]
|
||||
],
|
||||
"throws": "pragma and pragmaFrag cannot be set when runtime is automatic"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
/* @jsx h */
|
||||
|
||||
<div />;
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-react-jsx", { "runtime": "classic" }]
|
||||
]
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-react-jsx", {}]
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<div />;
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-react-jsx", { "pragma": "h", "runtime": "automatic" }]
|
||||
],
|
||||
"throws": "pragma and pragmaFrag cannot be set when runtime is automatic."
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<div />;
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-react-jsx", { "pragma": "h", "runtime": "classic" }]
|
||||
]
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-react-jsx", { "pragma": "h" }]
|
||||
]
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"plugins": [["transform-react-jsx", { "pragma": "foo.bar" }]]
|
||||
"plugins": [["transform-react-jsx", { "pragma": "foo.bar", "runtime": "classic" }]]
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"plugins": [["transform-react-jsx", { "pragma": "dom" }]]
|
||||
"plugins": [["transform-react-jsx", { "pragma": "dom", "runtime": "classic" }]]
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"plugins": [
|
||||
"external-helpers",
|
||||
"syntax-jsx",
|
||||
"transform-react-jsx",
|
||||
["transform-react-jsx", { "runtime": "classic" }],
|
||||
"transform-arrow-functions"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
{
|
||||
"plugins": ["transform-react-jsx", "transform-property-literals"]
|
||||
"plugins": [
|
||||
["transform-react-jsx", { "runtime": "classic" }],
|
||||
"transform-property-literals"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
"transform-react-jsx",
|
||||
{
|
||||
"pragma": "h",
|
||||
"runtime": "classic",
|
||||
"throwIfNamespace": false
|
||||
}
|
||||
]
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
"transform-react-jsx",
|
||||
{
|
||||
"pragma": "h",
|
||||
"runtime": "classic",
|
||||
"throwIfNamespace": true
|
||||
}
|
||||
]
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"plugins": [
|
||||
["transform-react-jsx", { "runtime": "classic" }]
|
||||
]
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"plugins": [
|
||||
"transform-react-jsx"
|
||||
]
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"BABEL_8_BREAKING": true,
|
||||
"plugins": ["transform-react-jsx"]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
var _reactJsxRuntime = require("react/jsx-runtime");
|
||||
|
||||
var x = /*#__PURE__*/_reactJsxRuntime.jsx("div", {
|
||||
children: /*#__PURE__*/_reactJsxRuntime.jsx("span", {})
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
var x = (<div><span /></div>);
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"BABEL_8_BREAKING": false,
|
||||
"plugins": ["transform-react-jsx"]
|
||||
}
|
||||
@@ -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"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user