swc
swc copied to clipboard
`Config.script` not work
Describe the bug
In type definition, option has a script
field
https://github.com/swc-project/swc/blob/308792dc90eefda5476a41a996a210c39e6f1a79/node-swc/src/types.ts#L19-L22
but when i use this field
{
jsc: {
target: 'es5',
},
sourceMaps: true,
script: true
}
Error occurs
Error: Argument at `2` is not JsBuffer
Caused by:
unknown field `script` at line 1 column 79
Version The version of @swc/core: 1.2.54
By the way, I want to know what configuration should I use when to transform a script instead of module
Same question. I turned into use isModule: false