An open API service indexing awesome lists of open source software.

https://github.com/h-ikeda/html-webpack-polyfills-plugin

Inject <script> tag that references polyfill service (https://polyfill.io) to html via HTML Webpack Plugin.
https://github.com/h-ikeda/html-webpack-polyfills-plugin

Last synced: 3 months ago
JSON representation

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

Awesome Lists containing this project

README

        

# HTML Webpack Polyfills Plugin
[![CircleCI](https://circleci.com/gh/h-ikeda/html-webpack-polyfills-plugin.svg?style=svg)](https://circleci.com/gh/h-ikeda/html-webpack-polyfills-plugin) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/95075b46c00c4921a2dff266cc5aa726)](https://www.codacy.com/app/h-ikeda/html-webpack-polyfills-plugin?utm_source=github.com&utm_medium=referral&utm_content=h-ikeda/html-webpack-polyfills-plugin&utm_campaign=Badge_Grade) [![Greenkeeper badge](https://badges.greenkeeper.io/h-ikeda/html-webpack-polyfills-plugin.svg)](https://greenkeeper.io/)
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,
``.

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"
### features
type: Array or string
default: undefined