discordjs / builders

A collection of builders that you can use when creating your bot.
Apache License 2.0
97 stars 37 forks source link

Replace Babel with SWC #60

Closed Khasms closed 2 years ago

Khasms commented 2 years ago

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.

iCrawl commented 2 years ago

I don't see why this is necessary, our tests are fast enough and coverage reports are actually quite buggy with swc still.