-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Describe the bug
If there is a decimal number inside object with jsc.transform.optimizer.jsonify
enabled, decimal part is removed.
Reproduction:
jsc.transform.optimizer.jsonify
enabled
jsc.transform.optimizer.jsonify
disabled
Seems like it always have been like that?
Input code
const someObject = {
'foo': {first: 0.1, second: 5}
}
Config
{
"jsc": {
"parser": {
"syntax": "ecmascript",
"jsx": false
},
"target": "es5",
"loose": false,
"minify": {
"compress": false,
"mangle": false
},
"transform": {
"optimizer": {
"jsonify": {
"minCost": 0
}
}
}
},
"module": {
"type": "es6"
},
"minify": false,
"isModule": true
}
Link to the code that reproduces this issue
SWC Info output
No response
Expected behavior
Decimal part from numbers should not be removed
Actual behavior
Decimal part from number is removed
Version
1.10.12
Additional context
No response
DakEnviy and Arucard89