Open IlCallo opened 2 years ago
IIRC SWC problem is its download size, but right now I see that it's much smaller than ts-jest
Do we need to add anything else except @swc/jest
? Do you know which are the downsides of its usage when compared with ts-jest + esbuild which should be much faster than ts-jest alone?
I found this article which compare esbuild to SWC and results are similar
Only the two steps in the docs are needed.
The only other dependency is @swc/core
, which is understandable, and I would consider it internal to the project.
I believe the performance compared to esbuild
is just about equal,
but maybe specific projects would prove one negligibly beneficial over the other.
Regarding downsides, just the chaining of the two projects, ts-jest
and esbuild
,
maybe there will be compatibility or performance conflicts one day, and maybe not at all.
I went with SWC
because it was self-contained, and I needed ES5 support for a back-end project (non-Vue, non-UI);
that was my only drawback with esbuild
.
I would have preferred esbuild
otherwise; since the whole Vue
community is rallying around Vite
and Vitest
, the dependency would have matched.
Maybe in that sense, esbuild
would be a better match (or Vitest
?), with similar dependencies across the Quasar
ecosystem.
Not sure if it can bring any advantage, but we could explore using
ts-jest
presets to simplify ourSome random notes:
'ts-jest'
orts-jest/presets/js-with-babel
?ts-jest/presets/js-with-babel
, would it help us get rid ofbabel-jest
dependency?Resources: