I didn't find any description of difference between transform and parser options in .swcrc, maybe you could explain it to me?
The thing, that confused me — that I already have a NestJS project that's using swc as a compiler, it's also uses a decorators — and it works just fine without transform properties specifying in .swcrc (it works in a production already for a month and it's fine) — and even though my own project starts and builds fine, it's just fails with running a tests with @swc/jest and I want to know, why is add transform properties helped me!
My stack is:
I also tried with a
^10
NestJS
— also had a bugI was wondering straight for 4 hours why my
providers
from simple code snippet:are
undefined
in service's constructor method when I use@swc/jest
, and not when I usets-jest
:I've updated all dependencies and did all the things that I only could, but I still was getting an error that they're
undefined
And after I just tried to add the following properties to my
.swcrc
file:And it did work And I was like: "What a heck?!?!?!?!"
Because I already did have decorators enabled in my parser of
.swcrc
:I didn't find any description of difference between transform and parser options in .swcrc, maybe you could explain it to me?
The thing, that confused me — that I already have a
NestJS
project that's usingswc
as a compiler, it's also uses a decorators — and it works just fine withouttransform
properties specifying in.swcrc
(it works in a production already for a month and it's fine) — and even though my own project starts and builds fine, it's just fails with running a tests with@swc/jest
and I want to know, why is addtransform
properties helped me!I would really appreciate your help ❤️.