diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 00000000..b0bf659d
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1,12 @@
+# These are supported funding model platforms
+
+github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
+patreon: # Replace with a single Patreon username
+open_collective: html-webpack-plugin
+ko_fi: # Replace with a single Ko-fi username
+tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
+community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
+liberapay: # Replace with a single Liberapay username
+issuehunt: # Replace with a single IssueHunt username
+otechie: # Replace with a single Otechie username
+custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 00000000..51f1a2ad
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,34 @@
+name: CI
+on: [push]
+jobs:
+ build:
+ name: test Node ${{ matrix.node }} Webpack ${{ matrix.webpack }} ${{ matrix.os }}
+ timeout-minutes: 15
+
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ node: ['10.x', '12.x', '14.x']
+ os: [ubuntu-latest, windows-latest, macOS-latest]
+ webpack: ['5']
+
+ steps:
+ - name: LF
+ run: git config --global core.autocrlf false
+
+ - name: Checkout repo
+ uses: actions/checkout@v2
+
+ - name: Use Node ${{ matrix.node }}
+ uses: actions/setup-node@v1
+ with:
+ node-version: ${{ matrix.node }}
+
+ - name: Install Dependencies
+ run: npm install --ignore-scripts --force --legacy-peer-deps
+
+ - name: Install Webpack ${{ matrix.webpack }}
+ run: npm install --ignore-scripts --force --legacy-peer-deps webpack@${{ matrix.webpack }}
+
+ - name: Test
+ run: npm test -- --forceExit || npm test -- --forceExit || npm test -- --forceExit
diff --git a/.gitignore b/.gitignore
index 12d299f7..cae599df 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@
npm-debug.*.log
yarn.lock
package-lock.json
+npm-debug.log.*
diff --git a/.node-version b/.node-version
index a0037765..db24ab96 100644
--- a/.node-version
+++ b/.node-version
@@ -1 +1 @@
-6.11.5
+10.13.0
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index e7aa5da5..00000000
--- a/.travis.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-language: node_js
-node_js:
- - stable
- - lts/*
- - 6.9
-env:
- - WEBPACK_CORE=4
- - WEBPACK_CORE=5
-jobs:
- exclude:
- - node_js: 6.9
- env: WEBPACK_CORE=5
-before_install:
- - stty columns 120
-install:
- - travis_retry npm install --ignore-scripts --force --legacy-peer-deps
- - travis_retry npm install "webpack@$WEBPACK_CORE" --ignore-scripts --force --legacy-peer-deps
-script:
- - travis_retry npm test
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 200eb424..2c621483 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,41 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+## [5.0.0](https://github.com/jantimon/html-webpack-plugin/compare/v4.5.1...v5.0.0) (2021-02-03)
+
+
+### ⚠ BREAKING CHANGES
+
+* Drop support for `webpack` 4 and `node` <= 10 - For older webpack or node versions please use `html-webpack-plugin` 4.x
+* Entry javascript resources are now beeing loaded deferred in the `
` tag to improve the page load performance by default - You can set the `scriptLoading` option to `'blocking'` to keep the previous behaviour
+* Setting publicPath to `''` (an empty string) will no longer calculate a relative path from the html file to the assets anymore - You can set the `publicPath` option to `'auto'` to keep the previous behaviour
+* Plugins for `html-webpack-plugin` which add additional assetTags should provide a `meta` attribute
+* Drop support for `appcache-webpack-plugin`
+
+### Features
+
+* drop `webpack` 4 and `node` <= 10 support to make use of the latest APIs ([b7a9e8f](https://github.com/jantimon/html-webpack-plugin/commit/b7a9e8f2a3c146cfec8f5c42888abd6aa0cde0b9))
+* use the new webpack 5 APIs and create html files during the new `webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONS` compilation stage ([8964bc4](https://github.com/jantimon/html-webpack-plugin/commit/8964bc4182e41807a564d3000217a40bc5f93ad2), [b6895cb](https://github.com/jantimon/html-webpack-plugin/commit/b6895cb5b85b1e6e850f638470cf9b839d421516), [a97234e](https://github.com/jantimon/html-webpack-plugin/commit/a97234ead5ea2dbba07a6e6a70c5ddb6a5a3c288), [1b59e09](https://github.com/jantimon/html-webpack-plugin/commit/1b59e0944f561b264f11847ef245c9fc3f05b80f), [4fca596](https://github.com/jantimon/html-webpack-plugin/commit/4fca5965315c49f6706812d9fdf6c7284d23d75b), [ed64a6b](https://github.com/jantimon/html-webpack-plugin/commit/ed64a6b35fe9cdbc610e9b766700f3b2fc2b8e4c), [86245db](https://github.com/jantimon/html-webpack-plugin/commit/86245db670a9b3bdd0e2aba9f2031745a98434c7), [50b3bec](https://github.com/jantimon/html-webpack-plugin/commit/50b3bec51a43289d6d1b4e1e6439560eb791576f), [c697725](https://github.com/jantimon/html-webpack-plugin/commit/c697725e9f4dd990bd4b7927bbfa7b826d2f36f2))
+* allow generating one file per chunk with the new `'[name]'` placeholder for the `filename` option ([cd5bd2a](https://github.com/jantimon/html-webpack-plugin/commit/cd5bd2afc902bbe5a5ceec4756ef634a26aa1332), [3d9ff48](https://github.com/jantimon/html-webpack-plugin/commit/3d9ff48543d04d9f7c3440bfefb43751775a9e81))
+* the `filename` option can now be a function ([c5beb4b](https://github.com/jantimon/html-webpack-plugin/commit/c5beb4bd16e4916b5355c300abebf9d7d3c587da))
+* add support for `'auto'` public paths inside templates ([a059fcf](https://github.com/jantimon/html-webpack-plugin/commit/a059fcf32d94aaaa738359cedce0b0e4af68f0de), [b09b439](https://github.com/jantimon/html-webpack-plugin/commit/b09b439f50ecb75994acde2eb2967ad690ff1cf0))
+* use defer as default script loading mechanism ([35b6b87](https://github.com/jantimon/html-webpack-plugin/commit/35b6b878db17f0f5704a187b336a14fdd58cedfc))
+* allow to set publicPath to an empty string `''` ([5ea7de4](https://github.com/jantimon/html-webpack-plugin/commit/5ea7de4ba271813835be700316c8a1763b205d2d))
+* improve typings ([197ddd8](https://github.com/jantimon/html-webpack-plugin/commit/197ddd88f39a2e6e70863b6fed2385d33043d137))
+* provide public path to the alterAssetTagGroups hook ([1b54dfb](https://github.com/jantimon/html-webpack-plugin/commit/1b54dfbd62c0d0df10dd3d2be9937626142d518f))
+* provide public path to the alterAssetTags hook ([b754626](https://github.com/jantimon/html-webpack-plugin/commit/b75462653d11803a428b1d29479e259c3010163f))
+* use `thisCompilation` in child compiler for faster builds ([1d59e9a](https://github.com/jantimon/html-webpack-plugin/commit/1d59e9a71ddba1429168c42569a7bd9bdd363f4f))
+* export new major in static property ([8b692bd](https://github.com/jantimon/html-webpack-plugin/commit/8b692bd7cc0b75ddf55f47da317eed9bd19dab91))
+* reduce dependencies ([8c28aaa](https://github.com/jantimon/html-webpack-plugin/commit/8c28aaa2bed5a7147b397fef3801cfe8fb5c34b9), [56e633f](https://github.com/jantimon/html-webpack-plugin/commit/56e633fcb90909c2bbedbd63590ecaa825d8b31f))
+
+
+### Bug Fixes
+
+* emit files on every build to work properly with plugins like the
+clean-webpack-plugin ([6b3d087](https://github.com/jantimon/html-webpack-plugin/commit/6b3d087cf17f63b596c298d70a42a7462dd0f881))
+* generate html files even if no webpack entry exists ([2693dfa](https://github.com/jantimon/html-webpack-plugin/commit/2693dfaf4c94625eab86afadfd0e4d8822092d6b))
+* keep binary format when adding assets ([7e2b208](https://github.com/jantimon/html-webpack-plugin/commit/7e2b208634e26299c509e0c6b3189e01e4c3d3df)), closes [#1537](https://github.com/jantimon/html-webpack-plugin/issues/1537)
+
### [4.5.1](https://github.com/jantimon/html-webpack-plugin/compare/v4.5.0...v4.5.1) (2021-01-03)
diff --git a/README.md b/README.md
index a9076b54..b4819b43 100644
--- a/README.md
+++ b/README.md
@@ -24,22 +24,22 @@
```bash
- npm i --save-dev html-webpack-plugin
+ npm i --save-dev html-webpack-plugin@4
```
```bash
- yarn add --dev html-webpack-plugin
+ yarn add --dev html-webpack-plugin@4
```
@@ -88,6 +88,8 @@ The `html-webpack-plugin` provides [hooks](https://github.com/jantimon/html-webp
* [csp-html-webpack-plugin](https://github.com/slackhq/csp-html-webpack-plugin) to add [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy) meta tags to the HTML output
* [webpack-nomodule-plugin](https://github.com/swimmadude66/webpack-nomodule-plugin) allows you to add a `nomodule` attribute to specific injected scripts, which prevents the scripts from being loaded by newer browsers. Good for limiting loads of polyfills.
* [html-webpack-skip-assets-plugin](https://github.com/swimmadude66/html-webpack-skip-assets-plugin) Skip adding certain output files to the html file. Built as a drop-in replacement for [html-webpack-exclude-assets-plugin](https://www.npmjs.com/package/html-webpack-exclude-assets-plugin) and works with newer [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin) versions
+ * [html-webpack-inject-preload](https://github.com/principalstudio/html-webpack-inject-preload) allows to add preload links <link rel='preload'> anywhere you want.
+
Usage
@@ -142,7 +144,7 @@ Allowed values are as follows:
|Name|Type|Default|Description|
|:--:|:--:|:-----:|:----------|
|**`title`**|`{String}`|`Webpack App`|The title to use for the generated HTML document|
-|**`filename`**|`{String}`|`'index.html'`|The file to write the HTML to. Defaults to `index.html`. You can specify a subdirectory here too (eg: `assets/admin.html`)|
+|**`filename`**|`{String\|Function}`|`'index.html'`|The file to write the HTML to. Defaults to `index.html`. You can specify a subdirectory here too (eg: `assets/admin.html`). The `[name]` placeholder will be replaced with the entry name. Can also be a function e.g. `(entryName) => entryName + '.html'`. |
|**`template`**|`{String}`|``|`webpack` relative or absolute path to the template. By default it will use `src/index.ejs` if it exists. Please see the [docs](https://github.com/jantimon/html-webpack-plugin/blob/master/docs/template-option.md) for details|
|**`templateContent`**|`{string\|Function\|false}`|false| Can be used instead of `template` to provide an inline template - please read the [Writing Your Own Templates](https://github.com/jantimon/html-webpack-plugin#writing-your-own-templates) section |
|**`templateParameters`**|`{Boolean\|Object\|Function}`| `false`| Allows to overwrite the parameters used in the template - see [example](https://github.com/jantimon/html-webpack-plugin/tree/master/examples/template-parameters) |
@@ -366,6 +368,7 @@ and the following options:
```js
{
collapseWhitespace: true,
+ keepClosingSlash: true,
removeComments: true,
removeRedundantAttributes: true,
removeScriptTypeAttributes: true,
@@ -518,6 +521,7 @@ about which values are passed.
styles: Array,
meta: Array,
},
+ publicPath: string,
outputName: string,
plugin: HtmlWebpackPlugin
}>
@@ -529,6 +533,7 @@ about which values are passed.
AsyncSeriesWaterfallHook<{
headTags: Array,
bodyTags: Array,
+ publicPath: string,
outputName: string,
plugin: HtmlWebpackPlugin
}>
@@ -665,5 +670,5 @@ This project uses the [semistandard code style](https://github.com/Flet/semistan
[deps]: https://david-dm.org/jantimon/html-webpack-plugin.svg
[deps-url]: https://david-dm.org/jantimon/html-webpack-plugin
-[tests]: http://img.shields.io/travis/jantimon/html-webpack-plugin.svg
-[tests-url]: https://travis-ci.org/jantimon/html-webpack-plugin
+[tests]: https://github.com/jantimon/html-webpack-plugin/workflows/CI/badge.svg
+[tests-url]: https://github.com/jantimon/html-webpack-plugin/actions?query=workflow%3ACI
diff --git a/appveyor.yml b/appveyor.yml
deleted file mode 100644
index 47f137cd..00000000
--- a/appveyor.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-# appveyor file
-# http://www.appveyor.com/docs/appveyor-yml
-
-environment:
- matrix:
- - nodejs_version: 0.10
- - nodejs_version: 0.12
- - nodejs_version: 4
-
-version: "{build}"
-build: off
-deploy: off
-matrix:
- fast_finish: true
-
-install:
- - ps: Install-Product node $env:nodejs_version
- - npm install
-
-test_script:
- - node --version
- - npm --version
- - npm test
diff --git a/examples/appcache/dist/webpack-4/bundle.js b/examples/appcache/dist/webpack-4/bundle.js
deleted file mode 100644
index 9fbb4892..00000000
--- a/examples/appcache/dist/webpack-4/bundle.js
+++ /dev/null
@@ -1,104 +0,0 @@
-/******/ (function(modules) { // webpackBootstrap
-/******/ // The module cache
-/******/ var installedModules = {};
-/******/
-/******/ // The require function
-/******/ function __webpack_require__(moduleId) {
-/******/
-/******/ // Check if module is in cache
-/******/ if(installedModules[moduleId]) {
-/******/ return installedModules[moduleId].exports;
-/******/ }
-/******/ // Create a new module (and put it into the cache)
-/******/ var module = installedModules[moduleId] = {
-/******/ i: moduleId,
-/******/ l: false,
-/******/ exports: {}
-/******/ };
-/******/
-/******/ // Execute the module function
-/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
-/******/
-/******/ // Flag the module as loaded
-/******/ module.l = true;
-/******/
-/******/ // Return the exports of the module
-/******/ return module.exports;
-/******/ }
-/******/
-/******/
-/******/ // expose the modules object (__webpack_modules__)
-/******/ __webpack_require__.m = modules;
-/******/
-/******/ // expose the module cache
-/******/ __webpack_require__.c = installedModules;
-/******/
-/******/ // define getter function for harmony exports
-/******/ __webpack_require__.d = function(exports, name, getter) {
-/******/ if(!__webpack_require__.o(exports, name)) {
-/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
-/******/ }
-/******/ };
-/******/
-/******/ // define __esModule on exports
-/******/ __webpack_require__.r = function(exports) {
-/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
-/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
-/******/ }
-/******/ Object.defineProperty(exports, '__esModule', { value: true });
-/******/ };
-/******/
-/******/ // create a fake namespace object
-/******/ // mode & 1: value is a module id, require it
-/******/ // mode & 2: merge all properties of value into the ns
-/******/ // mode & 4: return value when already ns object
-/******/ // mode & 8|1: behave like require
-/******/ __webpack_require__.t = function(value, mode) {
-/******/ if(mode & 1) value = __webpack_require__(value);
-/******/ if(mode & 8) return value;
-/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
-/******/ var ns = Object.create(null);
-/******/ __webpack_require__.r(ns);
-/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
-/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
-/******/ return ns;
-/******/ };
-/******/
-/******/ // getDefaultExport function for compatibility with non-harmony modules
-/******/ __webpack_require__.n = function(module) {
-/******/ var getter = module && module.__esModule ?
-/******/ function getDefault() { return module['default']; } :
-/******/ function getModuleExports() { return module; };
-/******/ __webpack_require__.d(getter, 'a', getter);
-/******/ return getter;
-/******/ };
-/******/
-/******/ // Object.prototype.hasOwnProperty.call
-/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
-/******/
-/******/ // __webpack_public_path__
-/******/ __webpack_require__.p = "";
-/******/
-/******/
-/******/ // Load entry module and return exports
-/******/ return __webpack_require__(__webpack_require__.s = 0);
-/******/ })
-/************************************************************************/
-/******/ ([
-/* 0 */
-/***/ (function(module, exports, __webpack_require__) {
-
-__webpack_require__(1);
-var h1 = document.createElement('h1');
-h1.innerHTML = 'Hello world!';
-document.body.appendChild(h1);
-
-
-/***/ }),
-/* 1 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// extracted by mini-css-extract-plugin
-
-/***/ })
-/******/ ]);
\ No newline at end of file
diff --git a/examples/appcache/dist/webpack-4/index.html b/examples/appcache/dist/webpack-4/index.html
deleted file mode 100644
index 3a2aa9e5..00000000
--- a/examples/appcache/dist/webpack-4/index.html
+++ /dev/null
@@ -1 +0,0 @@
-Example template
\ No newline at end of file
diff --git a/examples/appcache/dist/webpack-4/manifest.appcache b/examples/appcache/dist/webpack-4/manifest.appcache
deleted file mode 100644
index aebe66b6..00000000
--- a/examples/appcache/dist/webpack-4/manifest.appcache
+++ /dev/null
@@ -1,9 +0,0 @@
-CACHE MANIFEST
-# 2e387eef3192749536f8
-
-0714810ae3fb211173e2964249507195.png
-styles.css
-bundle.js
-
-NETWORK:
-*
diff --git a/examples/appcache/dist/webpack-4/styles.css b/examples/appcache/dist/webpack-4/styles.css
deleted file mode 100644
index e86486ba..00000000
--- a/examples/appcache/dist/webpack-4/styles.css
+++ /dev/null
@@ -1,3 +0,0 @@
-body {
- background: snow;
-}
diff --git a/examples/appcache/dist/webpack-5/bundle.js b/examples/appcache/dist/webpack-5/bundle.js
deleted file mode 100644
index 9ae17651..00000000
--- a/examples/appcache/dist/webpack-5/bundle.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/******/ (() => { // webpackBootstrap
-/******/ var __webpack_modules__ = ({
-
-/***/ 636:
-/***/ (() => {
-
-// extracted by mini-css-extract-plugin
-
-/***/ })
-
-/******/ });
-/************************************************************************/
-/******/ // The module cache
-/******/ var __webpack_module_cache__ = {};
-/******/
-/******/ // The require function
-/******/ function __webpack_require__(moduleId) {
-/******/ // Check if module is in cache
-/******/ if(__webpack_module_cache__[moduleId]) {
-/******/ return __webpack_module_cache__[moduleId].exports;
-/******/ }
-/******/ // Create a new module (and put it into the cache)
-/******/ var module = __webpack_module_cache__[moduleId] = {
-/******/ // no module.id needed
-/******/ // no module.loaded needed
-/******/ exports: {}
-/******/ };
-/******/
-/******/ // Execute the module function
-/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
-/******/
-/******/ // Return the exports of the module
-/******/ return module.exports;
-/******/ }
-/******/
-/************************************************************************/
-/******/ /************************************************************************/
-(() => {
-__webpack_require__(636);
-var h1 = document.createElement('h1');
-h1.innerHTML = 'Hello world!';
-document.body.appendChild(h1);
-
-})();
-
-/******/ })()
-;
\ No newline at end of file
diff --git a/examples/appcache/dist/webpack-5/index.html b/examples/appcache/dist/webpack-5/index.html
deleted file mode 100644
index 3a2aa9e5..00000000
--- a/examples/appcache/dist/webpack-5/index.html
+++ /dev/null
@@ -1 +0,0 @@
-Example template
\ No newline at end of file
diff --git a/examples/appcache/dist/webpack-5/manifest.appcache b/examples/appcache/dist/webpack-5/manifest.appcache
deleted file mode 100644
index d9dc95c2..00000000
--- a/examples/appcache/dist/webpack-5/manifest.appcache
+++ /dev/null
@@ -1,9 +0,0 @@
-CACHE MANIFEST
-# f509954c60c2fd048c91
-
-0714810ae3fb211173e2964249507195.png
-styles.css
-bundle.js
-
-NETWORK:
-*
diff --git a/examples/appcache/dist/webpack-5/styles.css b/examples/appcache/dist/webpack-5/styles.css
deleted file mode 100644
index e86486ba..00000000
--- a/examples/appcache/dist/webpack-5/styles.css
+++ /dev/null
@@ -1,3 +0,0 @@
-body {
- background: snow;
-}
diff --git a/examples/appcache/webpack.config.js b/examples/appcache/webpack.config.js
deleted file mode 100755
index 449a6cf9..00000000
--- a/examples/appcache/webpack.config.js
+++ /dev/null
@@ -1,34 +0,0 @@
-var path = require('path');
-var AppCachePlugin = require('appcache-webpack-plugin');
-var HtmlWebpackPlugin = require('../..');
-var MiniCssExtractPlugin = require('mini-css-extract-plugin');
-var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
-
-module.exports = {
- context: __dirname,
- entry: './example.js',
- output: {
- path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
- publicPath: '',
- filename: 'bundle.js'
- },
- module: {
- rules: [
- { test: /\.css$/, use: [MiniCssExtractPlugin.loader, 'css-loader'] },
- { test: /\.png$/, loader: 'file-loader' },
- { test: /\.html$/, loader: 'html-loader', options: { removeOptionalTags: false } }
- ]
- },
- plugins: [
- new AppCachePlugin(),
- new HtmlWebpackPlugin({
- filename: 'index.html',
- template: 'template.html',
- minify: {
- removeComments: true,
- collapseWhitespace: true
- }
- }),
- new MiniCssExtractPlugin({ filename: 'styles.css' })
- ]
-};
diff --git a/examples/chunk-optimization/dist/webpack-4/entryA.html b/examples/chunk-optimization/dist/webpack-4/entryA.html
deleted file mode 100644
index 00ab2b9e..00000000
--- a/examples/chunk-optimization/dist/webpack-4/entryA.html
+++ /dev/null
@@ -1 +0,0 @@
-Webpack App
\ No newline at end of file
diff --git a/examples/chunk-optimization/dist/webpack-4/entryA.js b/examples/chunk-optimization/dist/webpack-4/entryA.js
deleted file mode 100644
index c4d208c9..00000000
--- a/examples/chunk-optimization/dist/webpack-4/entryA.js
+++ /dev/null
@@ -1,171 +0,0 @@
-/******/ (function(modules) { // webpackBootstrap
-/******/ // install a JSONP callback for chunk loading
-/******/ function webpackJsonpCallback(data) {
-/******/ var chunkIds = data[0];
-/******/ var moreModules = data[1];
-/******/ var executeModules = data[2];
-/******/
-/******/ // add "moreModules" to the modules object,
-/******/ // then flag all "chunkIds" as loaded and fire callback
-/******/ var moduleId, chunkId, i = 0, resolves = [];
-/******/ for(;i < chunkIds.length; i++) {
-/******/ chunkId = chunkIds[i];
-/******/ if(installedChunks[chunkId]) {
-/******/ resolves.push(installedChunks[chunkId][0]);
-/******/ }
-/******/ installedChunks[chunkId] = 0;
-/******/ }
-/******/ for(moduleId in moreModules) {
-/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
-/******/ modules[moduleId] = moreModules[moduleId];
-/******/ }
-/******/ }
-/******/ if(parentJsonpFunction) parentJsonpFunction(data);
-/******/
-/******/ while(resolves.length) {
-/******/ resolves.shift()();
-/******/ }
-/******/
-/******/ // add entry modules from loaded chunk to deferred list
-/******/ deferredModules.push.apply(deferredModules, executeModules || []);
-/******/
-/******/ // run deferred modules when all chunks ready
-/******/ return checkDeferredModules();
-/******/ };
-/******/ function checkDeferredModules() {
-/******/ var result;
-/******/ for(var i = 0; i < deferredModules.length; i++) {
-/******/ var deferredModule = deferredModules[i];
-/******/ var fulfilled = true;
-/******/ for(var j = 1; j < deferredModule.length; j++) {
-/******/ var depId = deferredModule[j];
-/******/ if(installedChunks[depId] !== 0) fulfilled = false;
-/******/ }
-/******/ if(fulfilled) {
-/******/ deferredModules.splice(i--, 1);
-/******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
-/******/ }
-/******/ }
-/******/
-/******/ return result;
-/******/ }
-/******/
-/******/ // The module cache
-/******/ var installedModules = {};
-/******/
-/******/ // object to store loaded and loading chunks
-/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
-/******/ // Promise = chunk loading, 0 = chunk loaded
-/******/ var installedChunks = {
-/******/ 3: 0
-/******/ };
-/******/
-/******/ var deferredModules = [];
-/******/
-/******/ // The require function
-/******/ function __webpack_require__(moduleId) {
-/******/
-/******/ // Check if module is in cache
-/******/ if(installedModules[moduleId]) {
-/******/ return installedModules[moduleId].exports;
-/******/ }
-/******/ // Create a new module (and put it into the cache)
-/******/ var module = installedModules[moduleId] = {
-/******/ i: moduleId,
-/******/ l: false,
-/******/ exports: {}
-/******/ };
-/******/
-/******/ // Execute the module function
-/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
-/******/
-/******/ // Flag the module as loaded
-/******/ module.l = true;
-/******/
-/******/ // Return the exports of the module
-/******/ return module.exports;
-/******/ }
-/******/
-/******/
-/******/ // expose the modules object (__webpack_modules__)
-/******/ __webpack_require__.m = modules;
-/******/
-/******/ // expose the module cache
-/******/ __webpack_require__.c = installedModules;
-/******/
-/******/ // define getter function for harmony exports
-/******/ __webpack_require__.d = function(exports, name, getter) {
-/******/ if(!__webpack_require__.o(exports, name)) {
-/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
-/******/ }
-/******/ };
-/******/
-/******/ // define __esModule on exports
-/******/ __webpack_require__.r = function(exports) {
-/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
-/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
-/******/ }
-/******/ Object.defineProperty(exports, '__esModule', { value: true });
-/******/ };
-/******/
-/******/ // create a fake namespace object
-/******/ // mode & 1: value is a module id, require it
-/******/ // mode & 2: merge all properties of value into the ns
-/******/ // mode & 4: return value when already ns object
-/******/ // mode & 8|1: behave like require
-/******/ __webpack_require__.t = function(value, mode) {
-/******/ if(mode & 1) value = __webpack_require__(value);
-/******/ if(mode & 8) return value;
-/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
-/******/ var ns = Object.create(null);
-/******/ __webpack_require__.r(ns);
-/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
-/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
-/******/ return ns;
-/******/ };
-/******/
-/******/ // getDefaultExport function for compatibility with non-harmony modules
-/******/ __webpack_require__.n = function(module) {
-/******/ var getter = module && module.__esModule ?
-/******/ function getDefault() { return module['default']; } :
-/******/ function getModuleExports() { return module; };
-/******/ __webpack_require__.d(getter, 'a', getter);
-/******/ return getter;
-/******/ };
-/******/
-/******/ // Object.prototype.hasOwnProperty.call
-/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
-/******/
-/******/ // __webpack_public_path__
-/******/ __webpack_require__.p = "";
-/******/
-/******/ var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || [];
-/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
-/******/ jsonpArray.push = webpackJsonpCallback;
-/******/ jsonpArray = jsonpArray.slice();
-/******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);
-/******/ var parentJsonpFunction = oldJsonpFunction;
-/******/
-/******/
-/******/ // add entry module to deferred list
-/******/ deferredModules.push([2,1,5,2,0]);
-/******/ // run deferred modules when ready
-/******/ return checkDeferredModules();
-/******/ })
-/************************************************************************/
-/******/ ({
-
-/***/ 2:
-/***/ (function(module, exports, __webpack_require__) {
-
-__webpack_require__(0);
-var multiply = __webpack_require__(1);
-var concat = __webpack_require__(8);
-var h1 = document.createElement('h1');
-h1.innerHTML = concat('Hello world from Entry ', multiply(1, 1));
-document.body.appendChild(h1);
-
-
-/***/ })
-
-/******/ });
\ No newline at end of file
diff --git a/examples/chunk-optimization/dist/webpack-4/entryA~entryB.js b/examples/chunk-optimization/dist/webpack-4/entryA~entryB.js
deleted file mode 100644
index 5bc05859..00000000
--- a/examples/chunk-optimization/dist/webpack-4/entryA~entryB.js
+++ /dev/null
@@ -1,39 +0,0 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[0],[
-/* 0 */
-/***/ (function(module, exports, __webpack_require__) {
-
-
-var content = __webpack_require__(3);
-
-if(typeof content === 'string') content = [[module.i, content, '']];
-
-var transform;
-var insertInto;
-
-
-
-var options = {"hmr":true}
-
-options.transform = transform
-options.insertInto = undefined;
-
-var update = __webpack_require__(5)(content, options);
-
-if(content.locals) module.exports = content.locals;
-
-if(false) {}
-
-/***/ }),
-/* 1 */,
-/* 2 */,
-/* 3 */
-/***/ (function(module, exports, __webpack_require__) {
-
-exports = module.exports = __webpack_require__(4)(false);
-// Module
-exports.push([module.i, "body {\n background: snow;\n}", ""]);
-
-
-
-/***/ })
-]]);
\ No newline at end of file
diff --git a/examples/chunk-optimization/dist/webpack-4/entryB.html b/examples/chunk-optimization/dist/webpack-4/entryB.html
deleted file mode 100644
index 1867dd39..00000000
--- a/examples/chunk-optimization/dist/webpack-4/entryB.html
+++ /dev/null
@@ -1 +0,0 @@
-Webpack App
\ No newline at end of file
diff --git a/examples/chunk-optimization/dist/webpack-4/entryB.js b/examples/chunk-optimization/dist/webpack-4/entryB.js
deleted file mode 100644
index 6733c528..00000000
--- a/examples/chunk-optimization/dist/webpack-4/entryB.js
+++ /dev/null
@@ -1,170 +0,0 @@
-/******/ (function(modules) { // webpackBootstrap
-/******/ // install a JSONP callback for chunk loading
-/******/ function webpackJsonpCallback(data) {
-/******/ var chunkIds = data[0];
-/******/ var moreModules = data[1];
-/******/ var executeModules = data[2];
-/******/
-/******/ // add "moreModules" to the modules object,
-/******/ // then flag all "chunkIds" as loaded and fire callback
-/******/ var moduleId, chunkId, i = 0, resolves = [];
-/******/ for(;i < chunkIds.length; i++) {
-/******/ chunkId = chunkIds[i];
-/******/ if(installedChunks[chunkId]) {
-/******/ resolves.push(installedChunks[chunkId][0]);
-/******/ }
-/******/ installedChunks[chunkId] = 0;
-/******/ }
-/******/ for(moduleId in moreModules) {
-/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
-/******/ modules[moduleId] = moreModules[moduleId];
-/******/ }
-/******/ }
-/******/ if(parentJsonpFunction) parentJsonpFunction(data);
-/******/
-/******/ while(resolves.length) {
-/******/ resolves.shift()();
-/******/ }
-/******/
-/******/ // add entry modules from loaded chunk to deferred list
-/******/ deferredModules.push.apply(deferredModules, executeModules || []);
-/******/
-/******/ // run deferred modules when all chunks ready
-/******/ return checkDeferredModules();
-/******/ };
-/******/ function checkDeferredModules() {
-/******/ var result;
-/******/ for(var i = 0; i < deferredModules.length; i++) {
-/******/ var deferredModule = deferredModules[i];
-/******/ var fulfilled = true;
-/******/ for(var j = 1; j < deferredModule.length; j++) {
-/******/ var depId = deferredModule[j];
-/******/ if(installedChunks[depId] !== 0) fulfilled = false;
-/******/ }
-/******/ if(fulfilled) {
-/******/ deferredModules.splice(i--, 1);
-/******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
-/******/ }
-/******/ }
-/******/
-/******/ return result;
-/******/ }
-/******/
-/******/ // The module cache
-/******/ var installedModules = {};
-/******/
-/******/ // object to store loaded and loading chunks
-/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
-/******/ // Promise = chunk loading, 0 = chunk loaded
-/******/ var installedChunks = {
-/******/ 4: 0
-/******/ };
-/******/
-/******/ var deferredModules = [];
-/******/
-/******/ // The require function
-/******/ function __webpack_require__(moduleId) {
-/******/
-/******/ // Check if module is in cache
-/******/ if(installedModules[moduleId]) {
-/******/ return installedModules[moduleId].exports;
-/******/ }
-/******/ // Create a new module (and put it into the cache)
-/******/ var module = installedModules[moduleId] = {
-/******/ i: moduleId,
-/******/ l: false,
-/******/ exports: {}
-/******/ };
-/******/
-/******/ // Execute the module function
-/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
-/******/
-/******/ // Flag the module as loaded
-/******/ module.l = true;
-/******/
-/******/ // Return the exports of the module
-/******/ return module.exports;
-/******/ }
-/******/
-/******/
-/******/ // expose the modules object (__webpack_modules__)
-/******/ __webpack_require__.m = modules;
-/******/
-/******/ // expose the module cache
-/******/ __webpack_require__.c = installedModules;
-/******/
-/******/ // define getter function for harmony exports
-/******/ __webpack_require__.d = function(exports, name, getter) {
-/******/ if(!__webpack_require__.o(exports, name)) {
-/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
-/******/ }
-/******/ };
-/******/
-/******/ // define __esModule on exports
-/******/ __webpack_require__.r = function(exports) {
-/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
-/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
-/******/ }
-/******/ Object.defineProperty(exports, '__esModule', { value: true });
-/******/ };
-/******/
-/******/ // create a fake namespace object
-/******/ // mode & 1: value is a module id, require it
-/******/ // mode & 2: merge all properties of value into the ns
-/******/ // mode & 4: return value when already ns object
-/******/ // mode & 8|1: behave like require
-/******/ __webpack_require__.t = function(value, mode) {
-/******/ if(mode & 1) value = __webpack_require__(value);
-/******/ if(mode & 8) return value;
-/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
-/******/ var ns = Object.create(null);
-/******/ __webpack_require__.r(ns);
-/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
-/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
-/******/ return ns;
-/******/ };
-/******/
-/******/ // getDefaultExport function for compatibility with non-harmony modules
-/******/ __webpack_require__.n = function(module) {
-/******/ var getter = module && module.__esModule ?
-/******/ function getDefault() { return module['default']; } :
-/******/ function getModuleExports() { return module; };
-/******/ __webpack_require__.d(getter, 'a', getter);
-/******/ return getter;
-/******/ };
-/******/
-/******/ // Object.prototype.hasOwnProperty.call
-/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
-/******/
-/******/ // __webpack_public_path__
-/******/ __webpack_require__.p = "";
-/******/
-/******/ var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || [];
-/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
-/******/ jsonpArray.push = webpackJsonpCallback;
-/******/ jsonpArray = jsonpArray.slice();
-/******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);
-/******/ var parentJsonpFunction = oldJsonpFunction;
-/******/
-/******/
-/******/ // add entry module to deferred list
-/******/ deferredModules.push([9,1,2,0]);
-/******/ // run deferred modules when ready
-/******/ return checkDeferredModules();
-/******/ })
-/************************************************************************/
-/******/ ({
-
-/***/ 9:
-/***/ (function(module, exports, __webpack_require__) {
-
-__webpack_require__(0);
-var multiply = __webpack_require__(1);
-var h1 = document.createElement('h1');
-h1.innerHTML = 'Hello world from Entry ' + multiply(1, 2);
-document.body.appendChild(h1);
-
-
-/***/ })
-
-/******/ });
\ No newline at end of file
diff --git a/examples/chunk-optimization/dist/webpack-4/entryC.html b/examples/chunk-optimization/dist/webpack-4/entryC.html
deleted file mode 100644
index ae72852f..00000000
--- a/examples/chunk-optimization/dist/webpack-4/entryC.html
+++ /dev/null
@@ -1 +0,0 @@
-Webpack App
\ No newline at end of file
diff --git a/examples/chunk-optimization/dist/webpack-4/libMath.js b/examples/chunk-optimization/dist/webpack-4/libMath.js
deleted file mode 100644
index 5f52edb2..00000000
--- a/examples/chunk-optimization/dist/webpack-4/libMath.js
+++ /dev/null
@@ -1,28 +0,0 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[1],{
-
-/***/ 1:
-/***/ (function(module, exports, __webpack_require__) {
-
-var sum = __webpack_require__(7);
-module.exports = function multiply (a, b) {
- var m = 0;
- for (var i = 0; i < a; i = sum(i, 1)) {
- m = sum(m, b);
- }
- return m;
-};
-
-
-/***/ }),
-
-/***/ 7:
-/***/ (function(module, exports) {
-
-module.exports = function sum (a, b) {
- return a + b;
-};
-
-
-/***/ })
-
-}]);
\ No newline at end of file
diff --git a/examples/chunk-optimization/dist/webpack-4/libText.js b/examples/chunk-optimization/dist/webpack-4/libText.js
deleted file mode 100644
index 8a224113..00000000
--- a/examples/chunk-optimization/dist/webpack-4/libText.js
+++ /dev/null
@@ -1,13 +0,0 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[5],{
-
-/***/ 8:
-/***/ (function(module, exports) {
-
-module.exports = function concat (a, b) {
- return String(a) + String(b);
-};
-
-
-/***/ })
-
-}]);
\ No newline at end of file
diff --git a/examples/chunk-optimization/dist/webpack-4/vendors~entryA~entryB.js b/examples/chunk-optimization/dist/webpack-4/vendors~entryA~entryB.js
deleted file mode 100644
index a3f56fe2..00000000
--- a/examples/chunk-optimization/dist/webpack-4/vendors~entryA~entryB.js
+++ /dev/null
@@ -1,596 +0,0 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[2],[
-/* 0 */,
-/* 1 */,
-/* 2 */,
-/* 3 */,
-/* 4 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-/*
- MIT License http://www.opensource.org/licenses/mit-license.php
- Author Tobias Koppers @sokra
-*/
-// css base code, injected by the css-loader
-module.exports = function (useSourceMap) {
- var list = []; // return the list of modules as css string
-
- list.toString = function toString() {
- return this.map(function (item) {
- var content = cssWithMappingToString(item, useSourceMap);
-
- if (item[2]) {
- return '@media ' + item[2] + '{' + content + '}';
- } else {
- return content;
- }
- }).join('');
- }; // import a list of modules into the list
-
-
- list.i = function (modules, mediaQuery) {
- if (typeof modules === 'string') {
- modules = [[null, modules, '']];
- }
-
- var alreadyImportedModules = {};
-
- for (var i = 0; i < this.length; i++) {
- var id = this[i][0];
-
- if (id != null) {
- alreadyImportedModules[id] = true;
- }
- }
-
- for (i = 0; i < modules.length; i++) {
- var item = modules[i]; // skip already imported module
- // this implementation is not 100% perfect for weird media query combinations
- // when a module is imported multiple times with different media queries.
- // I hope this will never occur (Hey this way we have smaller bundles)
-
- if (item[0] == null || !alreadyImportedModules[item[0]]) {
- if (mediaQuery && !item[2]) {
- item[2] = mediaQuery;
- } else if (mediaQuery) {
- item[2] = '(' + item[2] + ') and (' + mediaQuery + ')';
- }
-
- list.push(item);
- }
- }
- };
-
- return list;
-};
-
-function cssWithMappingToString(item, useSourceMap) {
- var content = item[1] || '';
- var cssMapping = item[3];
-
- if (!cssMapping) {
- return content;
- }
-
- if (useSourceMap && typeof btoa === 'function') {
- var sourceMapping = toComment(cssMapping);
- var sourceURLs = cssMapping.sources.map(function (source) {
- return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */';
- });
- return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
- }
-
- return [content].join('\n');
-} // Adapted from convert-source-map (MIT)
-
-
-function toComment(sourceMap) {
- // eslint-disable-next-line no-undef
- var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
- var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
- return '/*# ' + data + ' */';
-}
-
-/***/ }),
-/* 5 */
-/***/ (function(module, exports, __webpack_require__) {
-
-/*
- MIT License http://www.opensource.org/licenses/mit-license.php
- Author Tobias Koppers @sokra
-*/
-
-var stylesInDom = {};
-
-var memoize = function (fn) {
- var memo;
-
- return function () {
- if (typeof memo === "undefined") memo = fn.apply(this, arguments);
- return memo;
- };
-};
-
-var isOldIE = memoize(function () {
- // Test for IE <= 9 as proposed by Browserhacks
- // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
- // Tests for existence of standard globals is to allow style-loader
- // to operate correctly into non-standard environments
- // @see https://github.com/webpack-contrib/style-loader/issues/177
- return window && document && document.all && !window.atob;
-});
-
-var getTarget = function (target, parent) {
- if (parent){
- return parent.querySelector(target);
- }
- return document.querySelector(target);
-};
-
-var getElement = (function (fn) {
- var memo = {};
-
- return function(target, parent) {
- // If passing function in options, then use it for resolve "head" element.
- // Useful for Shadow Root style i.e
- // {
- // insertInto: function () { return document.querySelector("#foo").shadowRoot }
- // }
- if (typeof target === 'function') {
- return target();
- }
- if (typeof memo[target] === "undefined") {
- var styleTarget = getTarget.call(this, target, parent);
- // Special case to return head of iframe instead of iframe itself
- if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
- try {
- // This will throw an exception if access to iframe is blocked
- // due to cross-origin restrictions
- styleTarget = styleTarget.contentDocument.head;
- } catch(e) {
- styleTarget = null;
- }
- }
- memo[target] = styleTarget;
- }
- return memo[target]
- };
-})();
-
-var singleton = null;
-var singletonCounter = 0;
-var stylesInsertedAtTop = [];
-
-var fixUrls = __webpack_require__(6);
-
-module.exports = function(list, options) {
- if (typeof DEBUG !== "undefined" && DEBUG) {
- if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
- }
-
- options = options || {};
-
- options.attrs = typeof options.attrs === "object" ? options.attrs : {};
-
- // Force single-tag solution on IE6-9, which has a hard limit on the # of