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..61d5c24d --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,37 @@ +name: CI + push: + branches: [main] + pull_request: + branches: [main] +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..e85923e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,89 @@ 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.5.0](https://github.com/jantimon/html-webpack-plugin/compare/v5.4.0...v5.5.0) (2021-10-25) + + +### Features + +* Support type=module via scriptLoading option ([1e42625](https://github.com/jantimon/html-webpack-plugin/commit/1e4262528ff02a83e1fc7739b42472680fd205c2)), closes [#1663](https://github.com/jantimon/html-webpack-plugin/issues/1663) + +### [5.4.0](https://github.com/jantimon/html-webpack-plugin/compare/v5.3.2...v5.3.3) (2021-10-15) + +### Features + +* update terser ([9c7fba0](https://github.com/jantimon/html-webpack-plugin/pull/1688) + +### [5.3.2](https://github.com/jantimon/html-webpack-plugin/compare/v5.3.1...v5.3.2) (2021-06-22) + +### Bug Fixes + +* update lodash and pretty error ([9c7fba0](https://github.com/jantimon/html-webpack-plugin/commit/9c7fba02d0aa7d9e804863a66eb896db3046f645) + +### [5.3.1](https://github.com/jantimon/html-webpack-plugin/compare/v5.3.0...v5.3.1) (2021-03-09) + + +### Bug Fixes + +* remove loader-utils from plugin core ([82d0ee8](https://github.com/jantimon/html-webpack-plugin/commit/82d0ee8ddf146f17d71e98c1b44b2f2ec7420051)) + +## [5.3.0](https://github.com/jantimon/html-webpack-plugin/compare/v5.2.0...v5.3.0) (2021-03-07) + + +### Features + +* allow to modify the interpolation options in webpack config ([d654f5b](https://github.com/jantimon/html-webpack-plugin/commit/d654f5b90022304335b372d424ff4c08d3a9d341)) +* drop loader-utils dependency ([41d7a50](https://github.com/jantimon/html-webpack-plugin/commit/41d7a50516aefd1af2704e3837d5d41351c6199b)) + +## [5.2.0](https://github.com/jantimon/html-webpack-plugin/compare/v5.1.0...v5.2.0) (2021-02-19) + + +### Features + +* improve ssr ([73d2a66](https://github.com/jantimon/html-webpack-plugin/commit/73d2a660b10b9ebf8a341f0ddb173bcaaf1e513c)) + +## [5.1.0](https://github.com/jantimon/html-webpack-plugin/compare/v5.0.0...v5.1.0) (2021-02-12) + + +### Features + +* omit html tag attribute with null/undefined/false value ([aa6e78d](https://github.com/jantimon/html-webpack-plugin/commit/aa6e78d1430c17d9cf05550b2c9f73a9a0c0166c)), closes [#1598](https://github.com/jantimon/html-webpack-plugin/issues/1598) + +## [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..8080d1ae 100644 --- a/README.md +++ b/README.md @@ -24,22 +24,22 @@

Webpack 5

```bash - npm i --save-dev html-webpack-plugin@next + npm i --save-dev html-webpack-plugin ``` ```bash - yarn add --dev html-webpack-plugin@next + yarn add --dev html-webpack-plugin ```

Webpack 4

```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 ``` @@ -79,7 +79,6 @@ The `html-webpack-plugin` provides [hooks](https://github.com/jantimon/html-webp * [html-webpack-include-assets-plugin](https://github.com/jharris4/html-webpack-include-assets-plugin) for including lists of js or css file paths (such as those copied by the copy-webpack-plugin). * [html-webpack-injector](https://github.com/thearchitgarg/html-webpack-injector) to inject chunks in `head` or `body` (different locations ) of same html document. * [resource-hints-webpack-plugin](https://github.com/jantimon/resource-hints-webpack-plugin) to add resource hints for faster initial page loads using `` and `` - * [preload-webpack-plugin](https://github.com/GoogleChrome/preload-webpack-plugin) for automatically wiring up asynchronous (and other types) of JavaScript chunks using `` helping with lazy-loading * [link-media-html-webpack-plugin](https://github.com/yaycmyk/link-media-html-webpack-plugin) allows for injected stylesheet `` tags to have their media attribute set automatically; useful for providing specific desktop/mobile/print etc. stylesheets that the browser will conditionally download * [html-webpack-inline-style-plugin](https://github.com/djaax/html-webpack-inline-style-plugin) for inlining styles to HTML elements using [juice](https://github.com/Automattic/juice). Useful for email generation automatisation. * [html-webpack-exclude-empty-assets-plugin](https://github.com/KnisterPeter/html-webpack-exclude-empty-assets-plugin) removes empty assets from being added to the html. This fixes some problems with extract-text-plugin with webpack 4. @@ -88,12 +87,14 @@ 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. + * [inject-body-webpack-plugin](https://github.com/Jaid/inject-body-webpack-plugin) is a simple method of injecting a custom HTML string into the body.

Usage

The plugin will generate an HTML5 file for you that includes all your `webpack` -bundles in the body using `script` tags. Just add the plugin to your `webpack` +bundles in the head using `script` tags. Just add the plugin to your `webpack` config as follows: **webpack.config.js** @@ -120,9 +121,9 @@ This will generate a file `dist/index.html` containing the following Webpack App + - ``` @@ -142,13 +143,13 @@ 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) | |**`inject`**|`{Boolean\|String}`|`true`|`true \|\| 'head' \|\| 'body' \|\| false` Inject all assets into the given `template` or `templateContent`. When passing `'body'` all javascript resources will be placed at the bottom of the body element. `'head'` will place the scripts in the head element. Passing `true` will add it to the head/body depending on the `scriptLoading` option. Passing `false` will disable automatic injections. - see the [inject:false example](https://github.com/jantimon/html-webpack-plugin/tree/master/examples/custom-insertion-position)| |**`publicPath`**|`{String\|'auto'}`|`'auto'`|The publicPath used for script and link tags| -|**`scriptLoading`**|`{'blocking'\|'defer'}`|`'blocking'`| Modern browsers support non blocking javascript loading (`'defer'`) to improve the page startup performance. | +|**`scriptLoading`**|`{'blocking'\|'defer'\|'module'}`|`'defer'`| Modern browsers support non blocking javascript loading (`'defer'`) to improve the page startup performance. Setting to `'module'` adds attribute [`type="module"`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules#applying_the_module_to_your_html). This also implies "defer", since modules are automatically deferred. | |**`favicon`**|`{String}`|``|Adds the given favicon path to the output HTML| |**`meta`**|`{Object}`|`{}`|Allows to inject `meta`-tags. E.g. `meta: {viewport: 'width=device-width, initial-scale=1, shrink-to-fit=no'}`| |**`base`**|`{Object\|String\|false}`|`false`|Inject a [`base`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base) tag. E.g. `base: "https://example.com/path/page.html`| @@ -366,6 +367,7 @@ and the following options: ```js { collapseWhitespace: true, + keepClosingSlash: true, removeComments: true, removeRedundantAttributes: true, removeScriptTypeAttributes: true, @@ -461,7 +463,7 @@ which will inject the element `:contenthash::]` - -* `hashType` - one of `sha1`, `md5`, `sha256`, `sha512` or any other node.js supported hash type -* `digestType` - one of `hex`, `base26`, `base32`, `base36`, `base49`, `base52`, `base58`, `base62`, `base64` -* `maxlength` - maximum length of the generated hash in chars +`contenthash` is the hash of the content of the output file. -**Defaults:** `[md5:contenthash:hex:9999]` +Refer webpack's [Template Strings](https://webpack.js.org/configuration/output/#template-strings) for more details ### Events @@ -518,6 +514,7 @@ about which values are passed. styles: Array, meta: Array, }, + publicPath: string, outputName: string, plugin: HtmlWebpackPlugin }> @@ -529,6 +526,7 @@ about which values are passed. AsyncSeriesWaterfallHook<{ headTags: Array, bodyTags: Array, + publicPath: string, outputName: string, plugin: HtmlWebpackPlugin }> @@ -665,5 +663,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 \ No newline at end of file diff --git a/examples/inline/dist/webpack-4/styles.css b/examples/inline/dist/webpack-4/styles.css deleted file mode 100644 index e86486ba..00000000 --- a/examples/inline/dist/webpack-4/styles.css +++ /dev/null @@ -1,3 +0,0 @@ -body { - background: snow; -} diff --git a/examples/inline/dist/webpack-5/bundle.js b/examples/inline/dist/webpack-5/bundle.js index a995ab3d..e8487f4b 100644 --- a/examples/inline/dist/webpack-5/bundle.js +++ b/examples/inline/dist/webpack-5/bundle.js @@ -1,11 +1,14 @@ /******/ (() => { // webpackBootstrap +/******/ "use strict"; /******/ var __webpack_modules__ = ({ /***/ 636: -/***/ (() => { +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +__webpack_require__.r(__webpack_exports__); // extracted by mini-css-extract-plugin + /***/ }) /******/ }); @@ -34,9 +37,21 @@ /******/ } /******/ /************************************************************************/ -/******/ /************************************************************************/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. (() => { -"use strict"; __webpack_require__(636); diff --git a/examples/inline/dist/webpack-5/index.html b/examples/inline/dist/webpack-5/index.html index 2583fe90..c401f660 100644 --- a/examples/inline/dist/webpack-5/index.html +++ b/examples/inline/dist/webpack-5/index.html @@ -1,13 +1,16 @@ pug demo \ No newline at end of file diff --git a/examples/javascript-advanced/dist/webpack-4/styles.css b/examples/javascript-advanced/dist/webpack-4/styles.css deleted file mode 100644 index e86486ba..00000000 --- a/examples/javascript-advanced/dist/webpack-4/styles.css +++ /dev/null @@ -1,3 +0,0 @@ -body { - background: snow; -} diff --git a/examples/javascript-advanced/dist/webpack-5/0714810ae3fb211173e2964249507195.png b/examples/javascript-advanced/dist/webpack-5/0714810ae3fb211173e2964249507195.png deleted file mode 100644 index d71b3d78..00000000 Binary files a/examples/javascript-advanced/dist/webpack-5/0714810ae3fb211173e2964249507195.png and /dev/null differ diff --git a/examples/appcache/logo.png b/examples/javascript-advanced/dist/webpack-5/55b19870aff2e53d1fb1.png similarity index 100% rename from examples/appcache/logo.png rename to examples/javascript-advanced/dist/webpack-5/55b19870aff2e53d1fb1.png diff --git a/examples/javascript-advanced/dist/webpack-5/bundle.js b/examples/javascript-advanced/dist/webpack-5/bundle.js index 3e1c0ed3..21942cec 100644 --- a/examples/javascript-advanced/dist/webpack-5/bundle.js +++ b/examples/javascript-advanced/dist/webpack-5/bundle.js @@ -1,6 +1,6 @@ /* * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). - * This devtool is not neither made for production nor for readable output files. + * This devtool is neither made for production nor for readable output files. * It uses "eval()" calls to create a separate source file in the browser devtools. * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) * or disable the default devtool with "devtool: false". @@ -9,6 +9,13 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ +/***/ 144: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { + +eval("__webpack_require__(636);\n\nvar universal = __webpack_require__(184);\nvar h1 = document.createElement('h1');\nh1.innerHTML = universal();\n\ndocument.body.appendChild(h1);\n\n\n//# sourceURL=webpack:///./example.js?"); + +/***/ }), + /***/ 184: /***/ ((module) => { @@ -18,9 +25,10 @@ eval("// This file is used for frontend and backend\n\n\n// If compiled by the h /***/ }), /***/ 636: -/***/ (() => { +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { -eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./main.css?"); +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n\n\n//# sourceURL=webpack:///./main.css?"); /***/ }) @@ -50,10 +58,23 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./main /******/ } /******/ /************************************************************************/ -/******/ /************************************************************************/ -(() => { -eval("__webpack_require__(636);\n\nvar universal = __webpack_require__(184);\nvar h1 = document.createElement('h1');\nh1.innerHTML = universal();\n\ndocument.body.appendChild(h1);\n\n\n//# sourceURL=webpack:///./example.js?"); -})(); - +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +/******/ +/******/ // startup +/******/ // Load entry module and return exports +/******/ // This entry module can't be inlined because the eval devtool is used. +/******/ var __webpack_exports__ = __webpack_require__(144); +/******/ /******/ })() ; \ No newline at end of file diff --git a/examples/javascript-advanced/dist/webpack-5/index.html b/examples/javascript-advanced/dist/webpack-5/index.html index 2ec60f39..216fe107 100644 --- a/examples/javascript-advanced/dist/webpack-5/index.html +++ b/examples/javascript-advanced/dist/webpack-5/index.html @@ -1 +1 @@ -Webpack AppHello World from backend -

Partial

\ No newline at end of file +Webpack AppHello World from backend -

Partial

\ No newline at end of file diff --git a/examples/javascript-advanced/template.js b/examples/javascript-advanced/template.js index bd0f7058..2b006a25 100644 --- a/examples/javascript-advanced/template.js +++ b/examples/javascript-advanced/template.js @@ -1,5 +1,5 @@ // Webpack require: -var partial = require('./partial.html'); +var partial = require('./partial.html').default; var universal = require('./universial.js'); // Export a function / promise / or a string: diff --git a/examples/javascript-advanced/webpack.config.js b/examples/javascript-advanced/webpack.config.js index 1449a690..a8e1af64 100644 --- a/examples/javascript-advanced/webpack.config.js +++ b/examples/javascript-advanced/webpack.config.js @@ -14,7 +14,7 @@ module.exports = { module: { rules: [ { test: /\.css$/, use: [MiniCssExtractPlugin.loader, 'css-loader'] }, - { test: /\.png$/, loader: 'file-loader' }, + { test: /\.png$/, type: 'asset/resource' }, { test: /\.html$/, loader: 'html-loader' } ] }, diff --git a/examples/javascript/dist/webpack-4/0714810ae3fb211173e2964249507195.png b/examples/javascript/dist/webpack-4/0714810ae3fb211173e2964249507195.png deleted file mode 100644 index d71b3d78..00000000 Binary files a/examples/javascript/dist/webpack-4/0714810ae3fb211173e2964249507195.png and /dev/null differ diff --git a/examples/javascript/dist/webpack-4/bundle.js b/examples/javascript/dist/webpack-4/bundle.js deleted file mode 100644 index a82aa75b..00000000 --- a/examples/javascript/dist/webpack-4/bundle.js +++ /dev/null @@ -1,107 +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__) { - -eval("__webpack_require__(1);\n\nvar universal = __webpack_require__(2);\nvar h1 = document.createElement('h1');\nh1.innerHTML = universal();\n\ndocument.body.appendChild(h1);\n\n\n//# sourceURL=webpack:///./example.js?"); - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - -eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./main.css?"); - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// This file is used for frontend and backend\n\n\n// If compiled by the html-webpack-plugin\n// HTML_WEBPACK_PLUGIN is set to true:\nvar backend = typeof HTML_WEBPACK_PLUGIN !== 'undefined';\n\nmodule.exports = function () {\n return 'Hello World from ' + (backend ? 'backend' : 'frontend');\n};\n\n\n//# sourceURL=webpack:///./universial.js?"); - -/***/ }) -/******/ ]); \ No newline at end of file diff --git a/examples/javascript/dist/webpack-4/index.html b/examples/javascript/dist/webpack-4/index.html deleted file mode 100644 index 0538840e..00000000 --- a/examples/javascript/dist/webpack-4/index.html +++ /dev/null @@ -1 +0,0 @@ -Hello World from backend2019-07-22T06:55:15.576Z

Partial

\ No newline at end of file diff --git a/examples/javascript/dist/webpack-4/styles.css b/examples/javascript/dist/webpack-4/styles.css deleted file mode 100644 index e86486ba..00000000 --- a/examples/javascript/dist/webpack-4/styles.css +++ /dev/null @@ -1,3 +0,0 @@ -body { - background: snow; -} diff --git a/examples/javascript/dist/webpack-5/0714810ae3fb211173e2964249507195.png b/examples/javascript/dist/webpack-5/0714810ae3fb211173e2964249507195.png deleted file mode 100644 index d71b3d78..00000000 Binary files a/examples/javascript/dist/webpack-5/0714810ae3fb211173e2964249507195.png and /dev/null differ diff --git a/examples/custom-template/dist/webpack-4/0714810ae3fb211173e2964249507195.png b/examples/javascript/dist/webpack-5/55b19870aff2e53d1fb1.png similarity index 100% rename from examples/custom-template/dist/webpack-4/0714810ae3fb211173e2964249507195.png rename to examples/javascript/dist/webpack-5/55b19870aff2e53d1fb1.png diff --git a/examples/javascript/dist/webpack-5/bundle.js b/examples/javascript/dist/webpack-5/bundle.js index 3e1c0ed3..75d23d21 100644 --- a/examples/javascript/dist/webpack-5/bundle.js +++ b/examples/javascript/dist/webpack-5/bundle.js @@ -1,11 +1,3 @@ -/* - * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). - * This devtool is not neither made for production nor for readable output files. - * It uses "eval()" calls to create a separate source file in the browser devtools. - * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) - * or disable the default devtool with "devtool: false". - * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). - */ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ @@ -13,14 +5,27 @@ /***/ ((module) => { "use strict"; -eval("// This file is used for frontend and backend\n\n\n// If compiled by the html-webpack-plugin\n// HTML_WEBPACK_PLUGIN is set to true:\nvar backend = typeof HTML_WEBPACK_PLUGIN !== 'undefined';\n\nmodule.exports = function () {\n return 'Hello World from ' + (backend ? 'backend' : 'frontend');\n};\n\n\n//# sourceURL=webpack:///./universial.js?"); +// This file is used for frontend and backend + + +// If compiled by the html-webpack-plugin +// HTML_WEBPACK_PLUGIN is set to true: +var backend = typeof HTML_WEBPACK_PLUGIN !== 'undefined'; + +module.exports = function () { + return 'Hello World from ' + (backend ? 'backend' : 'frontend'); +}; + /***/ }), /***/ 636: -/***/ (() => { +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin -eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./main.css?"); /***/ }) @@ -50,9 +55,29 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./main /******/ } /******/ /************************************************************************/ -/******/ /************************************************************************/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. (() => { -eval("__webpack_require__(636);\n\nvar universal = __webpack_require__(184);\nvar h1 = document.createElement('h1');\nh1.innerHTML = universal();\n\ndocument.body.appendChild(h1);\n\n\n//# sourceURL=webpack:///./example.js?"); +__webpack_require__(636); + +var universal = __webpack_require__(184); +var h1 = document.createElement('h1'); +h1.innerHTML = universal(); + +document.body.appendChild(h1); + })(); /******/ })() diff --git a/examples/javascript/dist/webpack-5/index.html b/examples/javascript/dist/webpack-5/index.html index 62334917..535cd403 100644 --- a/examples/javascript/dist/webpack-5/index.html +++ b/examples/javascript/dist/webpack-5/index.html @@ -1 +1 @@ -Hello World from backend2020-03-30T16:36:46.399Z

Partial

\ No newline at end of file +Hello World from backend2021-10-25T11:10:42.875Z

Partial

\ No newline at end of file diff --git a/examples/javascript/template.js b/examples/javascript/template.js index cbc74163..33ca1b57 100644 --- a/examples/javascript/template.js +++ b/examples/javascript/template.js @@ -1,5 +1,5 @@ // Webpack require: -var partial = require('./partial.html'); +var partial = require('./partial.html').default; var universal = require('./universial.js'); // Export a function / promise / or a string: diff --git a/examples/javascript/webpack.config.js b/examples/javascript/webpack.config.js index 510a462f..9945c4c5 100644 --- a/examples/javascript/webpack.config.js +++ b/examples/javascript/webpack.config.js @@ -7,17 +7,15 @@ module.exports = { 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: /\.png$/, type: 'asset/resource' }, { test: /\.html$/, loader: 'html-loader' } ] }, - devtool: 'eval', plugins: [ new HtmlWebpackPlugin({ template: 'template.js' diff --git a/examples/multi-page/dist/webpack-5/first.html b/examples/multi-page/dist/webpack-5/first.html new file mode 100644 index 00000000..930ee6eb --- /dev/null +++ b/examples/multi-page/dist/webpack-5/first.html @@ -0,0 +1 @@ +Webpack App \ No newline at end of file diff --git a/examples/multi-page/dist/webpack-5/first.js b/examples/multi-page/dist/webpack-5/first.js new file mode 100644 index 00000000..6f94dfe5 --- /dev/null +++ b/examples/multi-page/dist/webpack-5/first.js @@ -0,0 +1,478 @@ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 173: +/***/ ((module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(609); +/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__); +// Imports + +var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]}); +// Module +___CSS_LOADER_EXPORT___.push([module.id, "body {\n background: snow;\n}", ""]); +// Exports +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___); + + +/***/ }), + +/***/ 609: +/***/ ((module) => { + +"use strict"; + + +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +// css base code, injected by the css-loader +// eslint-disable-next-line func-names +module.exports = function (cssWithMappingToString) { + var list = []; // return the list of modules as css string + + list.toString = function toString() { + return this.map(function (item) { + var content = cssWithMappingToString(item); + + if (item[2]) { + return "@media ".concat(item[2], " {").concat(content, "}"); + } + + return content; + }).join(''); + }; // import a list of modules into the list + // eslint-disable-next-line func-names + + + list.i = function (modules, mediaQuery, dedupe) { + if (typeof modules === 'string') { + // eslint-disable-next-line no-param-reassign + modules = [[null, modules, '']]; + } + + var alreadyImportedModules = {}; + + if (dedupe) { + for (var i = 0; i < this.length; i++) { + // eslint-disable-next-line prefer-destructuring + var id = this[i][0]; + + if (id != null) { + alreadyImportedModules[id] = true; + } + } + } + + for (var _i = 0; _i < modules.length; _i++) { + var item = [].concat(modules[_i]); + + if (dedupe && alreadyImportedModules[item[0]]) { + // eslint-disable-next-line no-continue + continue; + } + + if (mediaQuery) { + if (!item[2]) { + item[2] = mediaQuery; + } else { + item[2] = "".concat(mediaQuery, " and ").concat(item[2]); + } + } + + list.push(item); + } + }; + + return list; +}; + +/***/ }), + +/***/ 965: +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62); +/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _node_modules_css_loader_dist_cjs_js_main_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(173); + + + +var options = {}; + +options.insert = "head"; +options.singleton = false; + +var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_main_css__WEBPACK_IMPORTED_MODULE_1__/* .default */ .Z, options); + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_main_css__WEBPACK_IMPORTED_MODULE_1__/* .default.locals */ .Z.locals || {}); + +/***/ }), + +/***/ 62: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; + + +var isOldIE = function isOldIE() { + var memo; + return function memorize() { + if (typeof memo === 'undefined') { + // 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 + memo = Boolean(window && document && document.all && !window.atob); + } + + return memo; + }; +}(); + +var getTarget = function getTarget() { + var memo = {}; + return function memorize(target) { + if (typeof memo[target] === 'undefined') { + var styleTarget = document.querySelector(target); // 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) { + // istanbul ignore next + styleTarget = null; + } + } + + memo[target] = styleTarget; + } + + return memo[target]; + }; +}(); + +var stylesInDom = []; + +function getIndexByIdentifier(identifier) { + var result = -1; + + for (var i = 0; i < stylesInDom.length; i++) { + if (stylesInDom[i].identifier === identifier) { + result = i; + break; + } + } + + return result; +} + +function modulesToDom(list, options) { + var idCountMap = {}; + var identifiers = []; + + for (var i = 0; i < list.length; i++) { + var item = list[i]; + var id = options.base ? item[0] + options.base : item[0]; + var count = idCountMap[id] || 0; + var identifier = "".concat(id, " ").concat(count); + idCountMap[id] = count + 1; + var index = getIndexByIdentifier(identifier); + var obj = { + css: item[1], + media: item[2], + sourceMap: item[3] + }; + + if (index !== -1) { + stylesInDom[index].references++; + stylesInDom[index].updater(obj); + } else { + stylesInDom.push({ + identifier: identifier, + updater: addStyle(obj, options), + references: 1 + }); + } + + identifiers.push(identifier); + } + + return identifiers; +} + +function insertStyleElement(options) { + var style = document.createElement('style'); + var attributes = options.attributes || {}; + + if (typeof attributes.nonce === 'undefined') { + var nonce = true ? __webpack_require__.nc : 0; + + if (nonce) { + attributes.nonce = nonce; + } + } + + Object.keys(attributes).forEach(function (key) { + style.setAttribute(key, attributes[key]); + }); + + if (typeof options.insert === 'function') { + options.insert(style); + } else { + var target = getTarget(options.insert || 'head'); + + if (!target) { + throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."); + } + + target.appendChild(style); + } + + return style; +} + +function removeStyleElement(style) { + // istanbul ignore if + if (style.parentNode === null) { + return false; + } + + style.parentNode.removeChild(style); +} +/* istanbul ignore next */ + + +var replaceText = function replaceText() { + var textStore = []; + return function replace(index, replacement) { + textStore[index] = replacement; + return textStore.filter(Boolean).join('\n'); + }; +}(); + +function applyToSingletonTag(style, index, remove, obj) { + var css = remove ? '' : obj.media ? "@media ".concat(obj.media, " {").concat(obj.css, "}") : obj.css; // For old IE + + /* istanbul ignore if */ + + if (style.styleSheet) { + style.styleSheet.cssText = replaceText(index, css); + } else { + var cssNode = document.createTextNode(css); + var childNodes = style.childNodes; + + if (childNodes[index]) { + style.removeChild(childNodes[index]); + } + + if (childNodes.length) { + style.insertBefore(cssNode, childNodes[index]); + } else { + style.appendChild(cssNode); + } + } +} + +function applyToTag(style, options, obj) { + var css = obj.css; + var media = obj.media; + var sourceMap = obj.sourceMap; + + if (media) { + style.setAttribute('media', media); + } else { + style.removeAttribute('media'); + } + + if (sourceMap && typeof btoa !== 'undefined') { + css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */"); + } // For old IE + + /* istanbul ignore if */ + + + if (style.styleSheet) { + style.styleSheet.cssText = css; + } else { + while (style.firstChild) { + style.removeChild(style.firstChild); + } + + style.appendChild(document.createTextNode(css)); + } +} + +var singleton = null; +var singletonCounter = 0; + +function addStyle(obj, options) { + var style; + var update; + var remove; + + if (options.singleton) { + var styleIndex = singletonCounter++; + style = singleton || (singleton = insertStyleElement(options)); + update = applyToSingletonTag.bind(null, style, styleIndex, false); + remove = applyToSingletonTag.bind(null, style, styleIndex, true); + } else { + style = insertStyleElement(options); + update = applyToTag.bind(null, style, options); + + remove = function remove() { + removeStyleElement(style); + }; + } + + update(obj); + return function updateStyle(newObj) { + if (newObj) { + if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) { + return; + } + + update(obj = newObj); + } else { + remove(); + } + }; +} + +module.exports = function (list, options) { + options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of