A webpack plugin for auto import polyfills using core-js custom build, you can combine it with esbuild-loader because esbuild-loader don't do auto polyfills
Getting Started
- Install as devDependencies:
pnpm install auto-polyfills-webpack-plugin -D
- then add it into webpack plugins config:
config.plugins.push(
new AutoPolyfillsWebpackPlugin();
);
and a minified file will be generated in project root (or custom with option cwd), then you should commit it for reused.
Options
type IOpts = {
cwd?: string;
browserslistPath?: string;
hashType?: string;
customPrefix?: string;
excludeCoreJsModules?: string[];
};