Add experimental version of the `babel-plugin-transform-react-… (#11154)
* add next option for babel-plugin-transform-react-jsx * address review comments * chore: update test fixtures * Update fixture * Add "columnNumber" to the new React transform * Update windows fixtures * Delete unused output.js * Update windows tests * Fix windows again * fix comments Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com> Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com> Co-authored-by: Moti Zilberman <motiz88@gmail.com>
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
var x = (
|
||||
<>
|
||||
<div>
|
||||
<div key="1" />
|
||||
<div key="2" meow="wolf" />
|
||||
<div key="3" />
|
||||
<div {...props} key="4" />
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"plugins": ["transform-react-jsx-development"],
|
||||
"sourceType": "module",
|
||||
"os": ["linux", "darwin"]
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
import { createElement as _createElement } from "react";
|
||||
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
|
||||
import { Fragment as _Fragment } from "react/jsx-dev-runtime";
|
||||
var _jsxFileName = "<CWD>/packages/babel-plugin-transform-react-jsx-development/test/fixtures/linux/auto-import-dev/input.js";
|
||||
|
||||
var x = _jsxDEV(_Fragment, {
|
||||
children: _jsxDEV("div", {
|
||||
children: [_jsxDEV("div", {}, "1", false, {
|
||||
fileName: _jsxFileName,
|
||||
lineNumber: 4,
|
||||
columnNumber: 7
|
||||
}, this), _jsxDEV("div", {
|
||||
meow: "wolf"
|
||||
}, "2", false, {
|
||||
fileName: _jsxFileName,
|
||||
lineNumber: 5,
|
||||
columnNumber: 7
|
||||
}, this), _jsxDEV("div", {}, "3", false, {
|
||||
fileName: _jsxFileName,
|
||||
lineNumber: 6,
|
||||
columnNumber: 7
|
||||
}, this), _createElement("div", { ...props,
|
||||
key: "4",
|
||||
__source: {
|
||||
fileName: _jsxFileName,
|
||||
lineNumber: 7,
|
||||
columnNumber: 7
|
||||
},
|
||||
__self: this
|
||||
})]
|
||||
}, void 0, true, {
|
||||
fileName: _jsxFileName,
|
||||
lineNumber: 3,
|
||||
columnNumber: 5
|
||||
}, this)
|
||||
}, void 0, false);
|
||||
Reference in New Issue
Block a user