benweizhu / webpack-polyfills-plugin

Fork from Sl1v3r/webpack-polyfills-plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

polyfills-service-webpack-plugin

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

(It is fork from Sl1v3r/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-service-webpack-plugin');

module.exports = {

   // ...

   plugins: [
      new PolyfillsPlugin([
         'Array/prototype/find',
         'fetch'
      ], /\.(css|scss)$/)
   ]
}

Benwei modified

npm install polyfills-service-webpack-plugin --save-dev

About

Fork from Sl1v3r/webpack-polyfills-plugin


Languages

Language:JavaScript 100.0%