Why you don’t need Babel
Blog post from LogRocket
In 2020, frontend developers continue to grapple with the challenges of excessive tooling, particularly with Babel, a compiler that facilitates compatibility of modern JavaScript with older browsers. While Babel is commonly used for transpiling new syntax into older formats and polyfilling missing features, the text suggests several alternatives to optimize development processes. One approach involves focusing on supporting only modern browsers to avoid the complexities of transpiling, though this can be constrained by the need to support legacy software in large corporations. Another method includes using the eslint-plugin-compat in Visual Studio Code to flag incompatible code without transpiling, giving developers more control over their production code. The text also highlights SWC, a faster Rust-based alternative to Babel with fewer dependencies, as a viable option for automatic translation. Additionally, Google Closure Compiler and TypeScript are mentioned as alternatives but require more complex setups. The emphasis is on assessing customer browser usage through analytics to determine the necessity of old browser support, thereby potentially simplifying development workflows.