Closed
Description
Describe the bug
Say I have a React component like this:
const a = () => {
return (
<>·</>
)
}
In SWC up to 1.12.1, this produces:
var a = function() {
return React.createElement(React.Fragment, null, "\xb7");
};
From 1.12.2 on, this same code produces:
var a = function() {
return React.createElement(React.Fragment, null, "·");
};
Input code
const a = () => {
return (
<>·</>
)
}
Config
{
"jsc": {
"parser": {
"syntax": "ecmascript",
"jsx": true
},
"target": "es5",
"loose": false,
"minify": {
"compress": false,
"mangle": {
"toplevel": false,
"keep_classnames": false,
"keep_fnames": false,
"keep_private_props": false,
"ie8": false,
"safari10": false
}
}
},
"module": {
"type": "es6"
},
"minify": false,
"isModule": true
}
Link to the code that reproduces this issue
SWC Info output
No response
Expected behavior
At least without a major version change, this code should continue to produce in 1.12.x:
var a = function() {
return React.createElement(React.Fragment, null, "\xb7");
};
Actual behavior
No response
Version
1.12.2
Additional context
No response