Autopolyfiller loader for webpack
This is like Autoprefixer, but for JavaScript polyfills. It scans your code and applies only required polyfills.
$ npm i -S autopolyfiller-loader
module: {
postLoaders: [ {
test: /\.js$/,
exclude: /\/(node_modules|bower_components)\//,
loader: 'autopolyfiller?{ browsers: [ "last 2 versions", "ie >= 9" ] }'
} ]
}