Investigate SWC + Spack as alternative to Webpack + Babeljs

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

As we are moving to remove support to Internet Explorer, this is a good chance to re-evaluate also our compilation/transpilation strategy.

With the removal of IE support, we can transpile less (which will help us decrease the build time, and get increased performance, for running native). This also makes it much easier to consider alternatives to BabelJS.

SWC is written in rust and we have discussed that in the past (the major blocker was building it required rust-nightly, not sure if this is still the case) On version 1.2, SWC introduced a rust based asset bundler https://swc-project.github.io/blog/2020/06/18/swc-1.2, which support things like outputing chunks, tree shaking and other types of optimization.

While this issue propose an investigation of the switch of both Webpack an BabelJS, the least disruptive change would be to replace BabelJS with SWC, as they are highly compatible anyway:

Here is a non-complete list of articles supporting swc:

Edited by 🤖 GitLab Bot 🤖