swc-plugin
swc-plugin copied to clipboard
[Bug]: plugin breaks decorators compilation
Description
Example: https://github.com/vvysokiy/swc-jest-decorators
Correct compiled code - playground link
Config .swcrc
{
"$schema": "https://json.schemastore.org/swcrc",
"sourceMaps": true,
"jsc": {
"target": "es2020",
"loose": true,
"externalHelpers": true,
"keepClassNames": false,
"parser": {
"syntax": "typescript",
"tsx": true,
"decorators": true,
"dynamicImport": true
},
"transform": {
"legacyDecorator": true,
"decoratorMetadata": true,
"react": {
"runtime": "automatic"
}
},
"experimental": {
"plugins": [
[
"@effector/swc-plugin",
{}
]
]
},
"minify": {
"mangle": false,
"compress": false
}
},
"minify": false,
"module": {
"type": "commonjs",
"strict": true,
"strictMode": true,
"lazy": true,
"noInterop": false
}
}
Versions
"@effector/swc-plugin": "0.0.8",
"@effector/swc-plugin": "0.0.7"
Device
- MacBook Air M1
- macOS 12.2.1 (21D62); Darwin 21.3.0