Babel strips TypeScript types without checking them
Babel transpiles TypeScript by erasing types, but it never type-checks. Pair it with tsc --noEmit to catch type errors before deployment.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Babel transpiles TypeScript by erasing types, but it never type-checks. Pair it with tsc --noEmit to catch type errors before deployment.
How @babel/plugin-transform-runtime centralises helper functions, cuts bundle bloat and avoids global namespace pollution, with practical configuration tips.
Learn how to use @babel/preset-env with 'useBuiltIns: usage' to automatically inject only the necessary polyfills, reducing bundle size while maintaining browser compatibility.
Use the JavaScript optional chaining operator (?.) to read nested object properties without TypeErrors, and pair it with nullish coalescing for fallback values.
Use Babel 7 preset-env to downlevel syntax and inject only the core-js polyfills your code actually references.
Learn how Babel’s preset-env can inject only the polyfills you actually need, based on your browserslist targets, and see the trade‑offs of the usage mode.
Transpile ES6 modules to CommonJS with Babel’s @babel/plugin-transform-modules-commonjs. Learn the minimal config, operational checks, failure modes, and when to switch to a bundler that keeps ES modules.
Builds pass and dev works, but production users see immediate SyntaxError for optional chaining or class fields. Learn to diagnose browserslist and preset-env target mismatches.
When Babel’s build output contains duplicated helper functions, bundle size balloons and runtime errors can surface. This guide walks through spotting the symptom, identifying the cause, and applying @babel/plugin-transform-runtime to share helpers safely.