babel
Installation
SKILL.md
Babel
Babel is the transpiler that made ES6+ possible. While slower than SWC/esbuild, it remains the most extensible compiler with the largest plugin ecosystem.
When to Use
- JavaScript / TypeScript Transpilation: Compiling modern ESNext, JSX, and TypeScript into backward-compatible JavaScript.
- Custom AST Code Transformations: Developing Babel plugins to automate code instrumentation, stripping, or macro generation.
- Polyfill Injection via core-js: Automatically injecting polyfills for target browser matrices using
@babel/preset-env. - Legacy Framework Support: Maintaining React and Webpack toolchains that depend on Babel transpilation.