Adds polyfills from polyfill-service to bundle file. Without magic.
Now the maintained plugin, forked from https://github.com/beda-software/webpack-polyfills-plugin/ and ownership transferred.
- Fist Parameter is which you want to Polyfills
- Second Parameter is provide for customer config which file you do not want to Poly, If you not provide this parameter, All files will execute Poly. This must be a Regular Expression
var PolyfillsPlugin = require('polyfills-webpack-plugin');
module.exports = {
// ...
plugins: [
new PolyfillsPlugin([
'Array/prototype/find',
'fetch'
], /\.(css|scss)$/)
]
}