SWC is a compiler for JS and TS written in Rust and is designed to be a replacement for Babel. According to their website, SWC is "20x faster than Babel on a single thread and 70x faster on four cores." Moving past marketing claims, SWC is better for this package in my opinion for a couple of reasons:
SWC supports much of what this repo needs out of the box, including decorator and typescript support, removing the need for a bunch of Babel plugins.
SWC is only 16kB, while Babel is over 1MB, not including plugins, which are hundreds of kilobytes themselves.
SWC is actually faster. Even setting aside examples like Next.js switching to SWC and getting up to 5x faster builds, on my machine, cold running this repo's tests resulted in 2x faster completion when using SWC, dropping times from 10.692s to 4.916s.
Feature
SWC is a compiler for JS and TS written in Rust and is designed to be a replacement for Babel. According to their website, SWC is "20x faster than Babel on a single thread and 70x faster on four cores." Moving past marketing claims, SWC is better for this package in my opinion for a couple of reasons:
Ideal solution or implementation
Replace all the Babel dependencies with @swc/core (compiler) and @swc/jest (jest integration). It's not hard to replace as SWC is designed to be as close to drop-in for Babel as possible.
Alternative solutions or implementations
Stick with Babel.
Other context
I am willing to PR this if it gets approved, after all, I had to do the swap anyway to test if it improved anything.