0.1.0 • Published 7 years ago

html-webpack-polyfills-plugin v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

HTML Webpack Polyfills Plugin

CircleCI Codacy Badge Greenkeeper badge
Inject <script> tag that references polyfill service (https://polyfill.io) to html via HTML Webpack Plugin.

Usage

On webpack.config.js,

const HtmlWebpackPlugin = require("html-webpack-plugin");
const HtmlWebpackPolyfillsPlugin = require("html-webpack-polyfills-plugin");

module.exports = {
    // ...
    plugins: [
        new HtmlWebpackPlugin(),
        new HtmlWebpackPolyfillsPlugin()
    ]
}

This configuration create index.html file containing script tag as below,
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>.

If you want to customize URL, pass options object to constructor.

    new HtmlWebpackPolyfillsPlugin({
        minify: false
    })

Options

Options below are available.

minify

type: boolean
default: true

type

type: string
default: "js"