Closed meskill closed 1 year ago
Having the same thing with @swc-node/loader
I have a similar issue with @swc-node/register. After debugging, I believe it was introduced on https://github.com/swc-project/swc-node/commit/1d557ece0d9ccbba027ff9f2d262c03d4b918bcb https://github.com/swc-project/swc-node/commit/af643b849c32abb58bd1c0fdf98eeeac08548e25. From 1.5.6 and onwards it's setting a default swc config during compilation.
In my case, running with SWCRC=true ......
solves the problem because it forces it to use the config in .swcrc.
However, I believe it's a bug.
After upgrading from
1.5.5
to1.6.2
I get next error related to legacyDecorators:The source problem of the issue:
@swc-node/jest
options to swc options@swc-node/jest
optionsswc
property it overrides the wholejsc
setup in the first piece of code.The log of the input options and result options are following:
Possible solution
Either use deepMerge to merge all of the options or use another way to provide defaults from tsconfig file