A Laravel Mix extension that integrates Babel, core-js, and regenerator-runtime to include polyfills in your Mix build. Version 3.0.1 is the latest stable release, compatible with Laravel Mix v6 and Webpack v5. It replaced the deprecated @babel/polyfill with core-js and regenerator-runtime in v2.0.0, and fixed a debug option error in v3.0.1. Compared to manual Babel configuration, this extension provides a simple Mix-friendly API for polyfill targeting via browserslist queries.
npm install laravel-mix-polyfillVerified import paths — ran on the pinned version, not inferred.
Installs and configures laravel-mix-polyfill with usage-based polyfilling targeting Firefox 50 and IE 11.
Upgrade to Laravel Mix v6+ and Webpack v5.
Remove any manual @babel/polyfill imports; let the extension handle polyfill entries.
Change useBuiltIns to 'usage' and let Babel inject only needed polyfills.
Avoid configuring polyfills elsewhere in Babel config; rely solely on this extension.
Update to v3.0.1 or later.
Add require('laravel-mix-polyfill') at the top of webpack.mix.js before using mix.polyfill().Run npm install laravel-mix-polyfill --save-dev
Use a valid browserslist query like '> 0.25%, not dead' or ensure correct syntax.