Choosing core-js polyfills: full bundle or targeted imports
Decide between full core-js, modular feature imports, and Babel usage-based polyfills based on bundle size and target browsers.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Decide between full core-js, modular feature imports, and Babel usage-based polyfills based on bundle size and target browsers.
Why import the entire D3 library when you only need scale and axis? This walkthrough shows how cherry-picking ES modules cuts bundle size, enables tree-shaking, and what to watch out for during migration.
A diagnostic guide to detect, analyze, and fix excessive Lodash bundle size caused by import patterns that defeat tree-shaking in webpack, Rollup, and Vite.
Vuetify 3's ES‑module exports let you import only the components you need, cutting the library's gzipped footprint from ~350 KB to under 80 KB. This post shows the import pattern, bundler settings, and a quick verification script.
Configure Rollup tree-shaking to remove unused ES module exports from browser bundles, with a worked example and verification steps.
Chart.js v3+ lets you import only the controllers, scales, and elements you need. Explicit registration via Chart.register() cuts a typical line chart bundle from ~80 kB to ~18 kB gzipped. This post shows the pattern, a Vite+TS worked example, and the runtime gotchas to watch for.
Stop shipping every core-js polyfill to every browser. Use core-js-compat with browserslist to import only the ECMAScript polyfills your supported targets actually need.
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.
Use selective core-js imports to add optional chaining to older browsers without shipping the full standard library.