-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reverts "Re-use common JSX element transform for <>...</>" (#15355)
* Reverts "Re-use common JSX element transform for <>...</>" * add a regression test * fix Babel 8 test error * Update fixtures (Windows) * disable the regression test on Babel 8 Co-authored-by: Babel Bot <babel-bot@users.noreply.github.com>
- Loading branch information
Showing
11 changed files
with
82 additions
and
40 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...l-plugin-transform-react-inline-elements/test/fixtures/inline-elements/fragment/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 +1 @@ | ||
/*#__PURE__*/babelHelpers.jsx(React.Fragment, {}, void 0, /*#__PURE__*/babelHelpers.jsx("span", {}), /*#__PURE__*/babelHelpers.jsx("div", {})); | ||
/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/babelHelpers.jsx("span", {}), /*#__PURE__*/babelHelpers.jsx("div", {})); |
2 changes: 1 addition & 1 deletion
2
...bel-plugin-transform-react-jsx-development/test/fixtures/linux/auto-import-dev/output.mjs
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
2 changes: 1 addition & 1 deletion
2
...-transform-react-jsx-development/test/fixtures/windows/auto-import-dev-windows/output.mjs
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
2 changes: 1 addition & 1 deletion
2
...nsform-react-jsx/test/fixtures/autoImport/auto-import-react-source-type-module/output.mjs
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
2 changes: 1 addition & 1 deletion
2
...orm-react-jsx/test/fixtures/react-automatic/does-not-add-source-self-automatic/output.mjs
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
2 changes: 1 addition & 1 deletion
2
...abel-plugin-transform-react-jsx/test/fixtures/react-automatic/handle-fragments/output.mjs
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,5 +1,5 @@ | ||
import { Fragment as _Fragment } from "react/jsx-runtime"; | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
import { Fragment as _Fragment } from "react/jsx-runtime"; | ||
var x = /*#__PURE__*/_jsx(_Fragment, { | ||
children: /*#__PURE__*/_jsx("div", {}) | ||
}); |
2 changes: 1 addition & 1 deletion
2
...ransform-react-jsx/test/fixtures/react-automatic/should-allow-nested-fragments/output.mjs
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
1 change: 1 addition & 0 deletions
1
...es/babel-plugin-transform-react-jsx/test/fixtures/regression/issue-15353-classic/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 @@ | ||
<>Test</>; |
9 changes: 9 additions & 0 deletions
9
...abel-plugin-transform-react-jsx/test/fixtures/regression/issue-15353-classic/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,9 @@ | ||
{ | ||
"BABEL_8_BREAKING": false, | ||
"plugins": [ | ||
[ | ||
"transform-react-jsx", | ||
{ "pragma": "m", "pragmaFrag": "'['", "runtime": "classic" } | ||
] | ||
] | ||
} |
1 change: 1 addition & 0 deletions
1
...s/babel-plugin-transform-react-jsx/test/fixtures/regression/issue-15353-classic/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 @@ | ||
m('[', null, "Test"); |