polyfills-webpack-plugin

Adds polyfills to bundle file, without magic.

Usage no npm install needed!

<script type="module">
  import polyfillsWebpackPlugin from 'https://cdn.skypack.dev/polyfills-webpack-plugin';
</script>

README

npm version

polyfills-webpack-plugin

Adds polyfills from polyfill-service to bundle file. Without magic.

(It is fork from Brogency/webpack-polyfills-plugin)

Usage:

  • 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)$/)
   ]
}