I am using swc
to transpile my Typescript code on a side project and am struggling ignoring the tests files from the final output using the cli --ignore
option.
lib versions:
@swc/cli: ^0.1.57
@swc/core: ^1.2.173
command:
swc ./src --out-dir dist --ignore **/*.test.ts
.swrc config
{
"jsc": {
"target": "es5",
"paths": {
"@src/*": ["./src/*"]
},
"parser": {
"syntax": "typescript",
"decorators": true,
"dynamicImport": true
}
},
"minify": true,
}
I still saw all tests files in my dist output folder. Note that using the exclude property in the .swcrc like this "exclude": [".*\\.spec|test\\.(j|t)s$", "mocks", "types"]
works, but how is the --ignore
arg supposed to be used ?