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.
Add runtime polyfills for finished ECMAScript features with core-js v3 stable while keeping syntax transforms separate.
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.
Add Array.prototype.flatMap support to legacy browsers with core-js. Follow this guide to install, import, and verify the polyfill while keeping bundle size and performance in check.
Use selective core-js imports to add optional chaining to older browsers without shipping the full standard library.
Blanket core-js imports bloat bundles and risk overriding natives. Targeted modular imports with runtime feature detection give smaller builds and safer polyfills for web and Node apps.
Stop shipping every core-js polyfill. Import only the ECMAScript features your app uses and verify the savings in your production bundle.
Import only the Array.flat polyfill from core-js to support IE11 and Safari 10 without bloating your JavaScript bundle.
Stop using .reduce() to build objects from maps. Learn how to implement the ES2020 Object.fromEntries polyfill via CoreJS to ensure cross-browser compatibility without bloating your bundle.