Describe the bug
The Configuring SWC docs contain several examples of .swcrc files with comments.
However, SWC cannot be used with a .swcrc file that contains any comments.
Config
{
"jsc": {
// Disable es3 / es5 / es2015 transforms
"target": "es2016"
}
}
Playground link
No response
Expected behavior
Ideally, .swcrc should use JSONC instead of JSON to allow the use of comments.
Actual behavior
SWC fails, with an error like:
Caused by:
0: failed to read swcrc file (svg-sprite-generator/src/index.ts)
1: failed to deserialize .swcrc (json) file: syntax error: 3:9
2: key must be a string at line 3 column 9
failed to process input file
Version
0.1.52
Additional context
No response
Describe the bug
The Configuring SWC docs contain several examples of
.swcrcfiles with comments.However, SWC cannot be used with a
.swcrcfile that contains any comments.Config
{ "jsc": { // Disable es3 / es5 / es2015 transforms "target": "es2016" } }Playground link
No response
Expected behavior
Ideally,
.swcrcshould useJSONCinstead ofJSONto allow the use of comments.Actual behavior
SWC fails, with an error like:
Version
0.1.52
Additional context
No response