Babel Configuration: When to Use Plugins vs. Presets
Stop guessing which Babel plugins you need. Learn the difference between precision plugins and automated presets to optimize your JavaScript bundle for target browsers.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Stop guessing which Babel plugins you need. Learn the difference between precision plugins and automated presets to optimize your JavaScript bundle for target browsers.
Stop bloating your JS bundles with unnecessary polyfills. Learn how to use @babel/preset-env with 'useBuiltIns: usage' and core-js to inject only the code your target browsers actually need.
Babel strips TypeScript types fast but skips type checking. Keep tsc --noEmit as a CI gate to catch errors before they ship.
A step-by-step diagnostic guide for identifying why @babel/preset-env fails to transform syntax or inject polyfills for older browsers, including ordered checks and targeted fixes.
Learn how Babel's transform‑runtime plugin replaces inline helpers with imports from @babel/runtime, cutting duplicate code and preventing global namespace pollution in your JavaScript bundles.
A tight target query is what keeps @babel/preset-env from rewriting syntax your users already run. Diff two target sets, keep ES modules for the bundler, and verify the result.
Stop shipping unnecessary polyfills. Learn how to use @babel/preset-env's useBuiltIns option to automatically inject only the code your target browsers actually need.
Stop shipping all of core-js/stable. Choose the right CoreJS entry point, wire up Babel's useBuiltIns: 'usage', and verify the bundle actually shrank.
Global polyfills bloat bundles and mutate prototypes. Learn how core-js/pure with Babel's usage mode injects only the polyfills your code actually needs, with config, example, and pitfalls.