diff --git a/.cspell.json b/.cspell.json index 693383038..1352c7ac5 100644 --- a/.cspell.json +++ b/.cspell.json @@ -26,7 +26,9 @@ "Bfile", "webpackconfig", "specialattribute", - "dircompare" + "dircompare", + "wagoid", + "autocrlf" ], "ignorePaths": [ "CHANGELOG.md", diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 03278b1e7..85895b6c1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -59,7 +59,18 @@ jobs: strategy: matrix: - node: ["10.x", "12.x", "14.x", "16.x", "18.x", "20.x"] + node: + [ + "10.x", + "12.x", + "14.x", + "16.x", + "18.x", + "20.x", + "22.x", + "24.x", + "25.x", + ] os: [ubuntu-latest, windows-latest, macOS-latest] webpack: [latest] diff --git a/examples/chunk-optimization/dist/webpack-5/192.js b/examples/chunk-optimization/dist/webpack-5/192.js index eda9c2b81..dd8ae84a8 100644 --- a/examples/chunk-optimization/dist/webpack-5/192.js +++ b/examples/chunk-optimization/dist/webpack-5/192.js @@ -1,27 +1,8 @@ "use strict"; (self["webpackChunk"] = self["webpackChunk"] || []).push([[192],{ -/***/ 810: -/***/ ((module, __webpack_exports__, __webpack_require__) => { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(935); -/* 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}\n", ""]); -// Exports -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___); - - -/***/ }), - -/***/ 192: -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +/***/ 192 +(__unused_webpack_module, __webpack_exports__, __webpack_require__) { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { @@ -44,6 +25,25 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_main_css__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.locals || {}); -/***/ }) +/***/ }, + +/***/ 810 +(module, __webpack_exports__, __webpack_require__) { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(935); +/* 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}\n", ""]); +// Exports +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___); + + +/***/ } }]); \ No newline at end of file diff --git a/examples/chunk-optimization/dist/webpack-5/461.js b/examples/chunk-optimization/dist/webpack-5/461.js index c51593fe4..1c2c54ba0 100644 --- a/examples/chunk-optimization/dist/webpack-5/461.js +++ b/examples/chunk-optimization/dist/webpack-5/461.js @@ -1,80 +1,8 @@ "use strict"; (self["webpackChunk"] = self["webpackChunk"] || []).push([[461],{ -/***/ 935: -/***/ ((module) => { - - - -/* - 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; -}; - -/***/ }), - -/***/ 591: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/***/ 591 +(module, __unused_webpack_exports, __webpack_require__) { @@ -346,6 +274,78 @@ module.exports = function (list, options) { }; }; -/***/ }) +/***/ }, + +/***/ 935 +(module) { + + + +/* + 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; +}; + +/***/ } }]); \ No newline at end of file diff --git a/examples/chunk-optimization/dist/webpack-5/entryA.js b/examples/chunk-optimization/dist/webpack-5/entryA.js index 2db62a436..8d8e3e5b0 100644 --- a/examples/chunk-optimization/dist/webpack-5/entryA.js +++ b/examples/chunk-optimization/dist/webpack-5/entryA.js @@ -1,8 +1,8 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ 910: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { +/***/ 910 +(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { __webpack_require__(192); var multiply = __webpack_require__(199); @@ -12,7 +12,7 @@ h1.innerHTML = concat("Hello world from Entry ", multiply(1, 1)); document.body.appendChild(h1); -/***/ }) +/***/ } /******/ }); /************************************************************************/ diff --git a/examples/chunk-optimization/dist/webpack-5/entryB.js b/examples/chunk-optimization/dist/webpack-5/entryB.js index 719eefafd..684144344 100644 --- a/examples/chunk-optimization/dist/webpack-5/entryB.js +++ b/examples/chunk-optimization/dist/webpack-5/entryB.js @@ -1,8 +1,8 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ 123: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { +/***/ 123 +(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { __webpack_require__(192); var multiply = __webpack_require__(199); @@ -11,7 +11,7 @@ h1.innerHTML = "Hello world from Entry " + multiply(1, 2); document.body.appendChild(h1); -/***/ }) +/***/ } /******/ }); /************************************************************************/ diff --git a/examples/chunk-optimization/dist/webpack-5/libMath.js b/examples/chunk-optimization/dist/webpack-5/libMath.js index 48a4cb0ba..be6cf3427 100644 --- a/examples/chunk-optimization/dist/webpack-5/libMath.js +++ b/examples/chunk-optimization/dist/webpack-5/libMath.js @@ -1,7 +1,17 @@ (self["webpackChunk"] = self["webpackChunk"] || []).push([[646],{ -/***/ 199: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/***/ 16 +(module) { + +module.exports = function sum(a, b) { + return a + b; +}; + + +/***/ }, + +/***/ 199 +(module, __unused_webpack_exports, __webpack_require__) { var sum = __webpack_require__(16); module.exports = function multiply(a, b) { @@ -13,16 +23,6 @@ module.exports = function multiply(a, b) { }; -/***/ }), - -/***/ 16: -/***/ ((module) => { - -module.exports = function sum(a, b) { - return a + b; -}; - - -/***/ }) +/***/ } }]); \ No newline at end of file diff --git a/examples/chunk-optimization/dist/webpack-5/libText.js b/examples/chunk-optimization/dist/webpack-5/libText.js index baad04cda..9ac498600 100644 --- a/examples/chunk-optimization/dist/webpack-5/libText.js +++ b/examples/chunk-optimization/dist/webpack-5/libText.js @@ -1,13 +1,13 @@ (self["webpackChunk"] = self["webpackChunk"] || []).push([[209],{ -/***/ 631: -/***/ ((module) => { +/***/ 631 +(module) { module.exports = function concat(a, b) { return String(a) + String(b); }; -/***/ }) +/***/ } }]); \ No newline at end of file diff --git a/examples/custom-template/dist/webpack-5/bundle.js b/examples/custom-template/dist/webpack-5/bundle.js index 23cd33809..f6584f301 100644 --- a/examples/custom-template/dist/webpack-5/bundle.js +++ b/examples/custom-template/dist/webpack-5/bundle.js @@ -1,15 +1,15 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ 969: -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +/***/ 969 +(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // extracted by mini-css-extract-plugin -/***/ }) +/***/ } /******/ }); /************************************************************************/ diff --git a/examples/default/dist/webpack-5/bundle.js b/examples/default/dist/webpack-5/bundle.js index dedede663..deda41922 100644 --- a/examples/default/dist/webpack-5/bundle.js +++ b/examples/default/dist/webpack-5/bundle.js @@ -1,101 +1,8 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ 810: -/***/ ((module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(935); -/* 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}\n", ""]); -// Exports -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___); - - -/***/ }), - -/***/ 935: -/***/ ((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; -}; - -/***/ }), - -/***/ 192: -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +/***/ 192 +(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); @@ -119,10 +26,10 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_main_css__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.locals || {}); -/***/ }), +/***/ }, -/***/ 591: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/***/ 591 +(module, __unused_webpack_exports, __webpack_require__) { "use strict"; @@ -395,7 +302,100 @@ module.exports = function (list, options) { }; }; -/***/ }) +/***/ }, + +/***/ 810 +(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(935); +/* 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}\n", ""]); +// Exports +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___); + + +/***/ }, + +/***/ 935 +(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; +}; + +/***/ } /******/ }); /************************************************************************/ diff --git a/examples/favicon/dist/webpack-5/bundle.js b/examples/favicon/dist/webpack-5/bundle.js index 23cd33809..f6584f301 100644 --- a/examples/favicon/dist/webpack-5/bundle.js +++ b/examples/favicon/dist/webpack-5/bundle.js @@ -1,15 +1,15 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ 969: -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +/***/ 969 +(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // extracted by mini-css-extract-plugin -/***/ }) +/***/ } /******/ }); /************************************************************************/ diff --git a/examples/html-loader/dist/webpack-5/bundle.js b/examples/html-loader/dist/webpack-5/bundle.js index 23cd33809..f6584f301 100644 --- a/examples/html-loader/dist/webpack-5/bundle.js +++ b/examples/html-loader/dist/webpack-5/bundle.js @@ -1,15 +1,15 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ 969: -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +/***/ 969 +(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // extracted by mini-css-extract-plugin -/***/ }) +/***/ } /******/ }); /************************************************************************/ diff --git a/examples/inline/dist/webpack-5/bundle.js b/examples/inline/dist/webpack-5/bundle.js index 92d9dea1f..530ef5659 100644 --- a/examples/inline/dist/webpack-5/bundle.js +++ b/examples/inline/dist/webpack-5/bundle.js @@ -2,14 +2,14 @@ /******/ "use strict"; /******/ var __webpack_modules__ = ({ -/***/ 969: -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +/***/ 969 +(__unused_webpack_module, __webpack_exports__, __webpack_require__) { __webpack_require__.r(__webpack_exports__); // extracted by mini-css-extract-plugin -/***/ }) +/***/ } /******/ }); /************************************************************************/ diff --git a/examples/inline/dist/webpack-5/index.html b/examples/inline/dist/webpack-5/index.html index 45c15817c..deef635c4 100644 --- a/examples/inline/dist/webpack-5/index.html +++ b/examples/inline/dist/webpack-5/index.html @@ -4,14 +4,14 @@ /******/ "use strict"; /******/ var __webpack_modules__ = ({ -/***/ 969: -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +/***/ 969 +(__unused_webpack_module, __webpack_exports__, __webpack_require__) { __webpack_require__.r(__webpack_exports__); // extracted by mini-css-extract-plugin -/***/ }) +/***/ } /******/ }); /************************************************************************/ diff --git a/examples/javascript-advanced/dist/webpack-5/bundle.js b/examples/javascript-advanced/dist/webpack-5/bundle.js index 4f8fa3502..7f1b7ce9b 100644 --- a/examples/javascript-advanced/dist/webpack-5/bundle.js +++ b/examples/javascript-advanced/dist/webpack-5/bundle.js @@ -9,28 +9,28 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ 48: -/***/ ((module) => { +/***/ 48 +(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:///./universal.js?\n}"); -/***/ }), +/***/ }, -/***/ 695: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { +/***/ 695 +(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { eval("{__webpack_require__(969);\n\nvar universal = __webpack_require__(48);\nvar h1 = document.createElement(\"h1\");\nh1.innerHTML = universal();\n\ndocument.body.appendChild(h1);\n\n\n//# sourceURL=webpack:///./example.js?\n}"); -/***/ }), +/***/ }, -/***/ 969: -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +/***/ 969 +(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n\n\n//# sourceURL=webpack:///./main.css?\n}"); -/***/ }) +/***/ } /******/ }); /************************************************************************/ diff --git a/examples/javascript/dist/webpack-5/bundle.js b/examples/javascript/dist/webpack-5/bundle.js index dcf44cd32..9d7609598 100644 --- a/examples/javascript/dist/webpack-5/bundle.js +++ b/examples/javascript/dist/webpack-5/bundle.js @@ -1,8 +1,8 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ 48: -/***/ ((module) => { +/***/ 48 +(module) { "use strict"; // This file is used for frontend and backend @@ -17,17 +17,17 @@ module.exports = function () { }; -/***/ }), +/***/ }, -/***/ 969: -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +/***/ 969 +(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // extracted by mini-css-extract-plugin -/***/ }) +/***/ } /******/ }); /************************************************************************/ diff --git a/examples/javascript/dist/webpack-5/index.html b/examples/javascript/dist/webpack-5/index.html index 7d81bdeba..684cba44d 100644 --- a/examples/javascript/dist/webpack-5/index.html +++ b/examples/javascript/dist/webpack-5/index.html @@ -1 +1 @@ -
Hello World from backend2024-10-17T16:15:19.815Z
\ No newline at end of file
+Hello World from backend2026-01-16T16:38:04.038Z
\ 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
index dedede663..deda41922 100644
--- a/examples/multi-page/dist/webpack-5/first.js
+++ b/examples/multi-page/dist/webpack-5/first.js
@@ -1,101 +1,8 @@
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
-/***/ 810:
-/***/ ((module, __webpack_exports__, __webpack_require__) => {
-
-"use strict";
-/* harmony export */ __webpack_require__.d(__webpack_exports__, {
-/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
-/* harmony export */ });
-/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(935);
-/* 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}\n", ""]);
-// Exports
-/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
-
-
-/***/ }),
-
-/***/ 935:
-/***/ ((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;
-};
-
-/***/ }),
-
-/***/ 192:
-/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+/***/ 192
+(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
@@ -119,10 +26,10 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_main_css__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.locals || {});
-/***/ }),
+/***/ },
-/***/ 591:
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+/***/ 591
+(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
@@ -395,7 +302,100 @@ module.exports = function (list, options) {
};
};
-/***/ })
+/***/ },
+
+/***/ 810
+(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(935);
+/* 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}\n", ""]);
+// Exports
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
+
+
+/***/ },
+
+/***/ 935
+(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;
+};
+
+/***/ }
/******/ });
/************************************************************************/
diff --git a/examples/multi-page/dist/webpack-5/second.js b/examples/multi-page/dist/webpack-5/second.js
index dedede663..deda41922 100644
--- a/examples/multi-page/dist/webpack-5/second.js
+++ b/examples/multi-page/dist/webpack-5/second.js
@@ -1,101 +1,8 @@
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
-/***/ 810:
-/***/ ((module, __webpack_exports__, __webpack_require__) => {
-
-"use strict";
-/* harmony export */ __webpack_require__.d(__webpack_exports__, {
-/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
-/* harmony export */ });
-/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(935);
-/* 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}\n", ""]);
-// Exports
-/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
-
-
-/***/ }),
-
-/***/ 935:
-/***/ ((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;
-};
-
-/***/ }),
-
-/***/ 192:
-/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+/***/ 192
+(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
@@ -119,10 +26,10 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_main_css__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.locals || {});
-/***/ }),
+/***/ },
-/***/ 591:
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+/***/ 591
+(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
@@ -395,7 +302,100 @@ module.exports = function (list, options) {
};
};
-/***/ })
+/***/ },
+
+/***/ 810
+(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(935);
+/* 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}\n", ""]);
+// Exports
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
+
+
+/***/ },
+
+/***/ 935
+(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;
+};
+
+/***/ }
/******/ });
/************************************************************************/
diff --git a/examples/pug-loader/dist/webpack-5/bundle.js b/examples/pug-loader/dist/webpack-5/bundle.js
index 4c8c218a6..fd0562980 100644
--- a/examples/pug-loader/dist/webpack-5/bundle.js
+++ b/examples/pug-loader/dist/webpack-5/bundle.js
@@ -1,8 +1,8 @@
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
-/***/ 355:
-/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+/***/ 355
+(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
@@ -293,10 +293,10 @@ function pug_rethrow(err, filename, lineno, str) {
}
-/***/ }),
+/***/ },
-/***/ 487:
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+/***/ 487
+(module, __unused_webpack_exports, __webpack_require__) {
var pug = __webpack_require__(355);
@@ -311,24 +311,24 @@ function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;;
;;return pug_html;};
module.exports = template;
-/***/ }),
+/***/ },
-/***/ 900:
-/***/ (() => {
+/***/ 900
+() {
/* (ignored) */
-/***/ }),
+/***/ },
-/***/ 969:
-/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+/***/ 969
+(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
-/***/ })
+/***/ }
/******/ });
/************************************************************************/
diff --git a/examples/sort-manually/dist/webpack-5/a.js b/examples/sort-manually/dist/webpack-5/a.js
index 1147e0c19..d435d18eb 100644
--- a/examples/sort-manually/dist/webpack-5/a.js
+++ b/examples/sort-manually/dist/webpack-5/a.js
@@ -1,15 +1,15 @@
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
-/***/ 969:
-/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+/***/ 969
+(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
-/***/ })
+/***/ }
/******/ });
/************************************************************************/
diff --git a/index.js b/index.js
index 0fb060ae9..921251cca 100644
--- a/index.js
+++ b/index.js
@@ -636,8 +636,10 @@ class HtmlWebpackPlugin {
Object.getPrototypeOf(global),
Object.getOwnPropertyDescriptors(global),
);
- // Presence of `eval` breaks template's explicit `eval` call, might be a bug in Node
+ // Presence of `eval` and `Function` breaks template's explicit `eval` call
+ // Ref: https://github.com/nodejs/help/issues/2880
delete globalClone.eval;
+ delete globalClone.Function;
// Not using `...global` as it throws when localStorage is not explicitly enabled in Node 25+
const vmContext = vm.createContext(
Object.assign(globalClone, {
diff --git a/package-lock.json b/package-lock.json
index 0a80c85e5..050b30b35 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -25,6 +25,7 @@
"cz-conventional-changelog": "2.1.0",
"dir-compare": "^3.3.0",
"eslint": "^8.56.0",
+ "handlebars-loader": "^1.7.3",
"html-loader": "2.1.1",
"husky": "^9.0.10",
"jest": "^27.2.5",
@@ -39,7 +40,7 @@
"standard-version": "^9.3.0",
"style-loader": "2.0.0",
"typescript": "4.9.4",
- "webpack": "^5.101.0",
+ "webpack": "^5.104.1",
"webpack-cli": "4.5.0",
"webpack-recompilation-simulator": "3.2.0"
},
@@ -2916,6 +2917,13 @@
"integrity": "sha512-TaTivMB6pYI1kXwrFlEhLeGfOqoDNdTxjCdwRfFFkEA30Eu+k48W34nlok2EYWJfFFzqaEmichdNM7th6M5HNw==",
"dev": true
},
+ "node_modules/async": {
+ "version": "3.2.6",
+ "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz",
+ "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
@@ -3060,6 +3068,16 @@
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
"dev": true
},
+ "node_modules/baseline-browser-mapping": {
+ "version": "2.9.15",
+ "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.15.tgz",
+ "integrity": "sha512-kX8h7K2srmDyYnXRIppo4AH/wYgzWVCs+eKr3RusRSQ5PvRYoEFmR/I0PbdTjKFAoKqp5+kbxnNTFO9jOfSVJg==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "bin": {
+ "baseline-browser-mapping": "dist/cli.js"
+ }
+ },
"node_modules/big.js": {
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
@@ -3103,9 +3121,9 @@
"dev": true
},
"node_modules/browserslist": {
- "version": "4.25.1",
- "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.1.tgz",
- "integrity": "sha512-KGj0KoOMXLpSNkkEI6Z6mShmQy0bc1I+T7K9N81k4WWMrfz+6fQ6es80B/YLAeRoKvjYE1YSHHOW1qe9xIVzHw==",
+ "version": "4.28.1",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz",
+ "integrity": "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==",
"dev": true,
"funding": [
{
@@ -3123,10 +3141,11 @@
],
"license": "MIT",
"dependencies": {
- "caniuse-lite": "^1.0.30001726",
- "electron-to-chromium": "^1.5.173",
- "node-releases": "^2.0.19",
- "update-browserslist-db": "^1.1.3"
+ "baseline-browser-mapping": "^2.9.0",
+ "caniuse-lite": "^1.0.30001759",
+ "electron-to-chromium": "^1.5.263",
+ "node-releases": "^2.0.27",
+ "update-browserslist-db": "^1.2.0"
},
"bin": {
"browserslist": "cli.js"
@@ -3232,9 +3251,9 @@
}
},
"node_modules/caniuse-lite": {
- "version": "1.0.30001731",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001731.tgz",
- "integrity": "sha512-lDdp2/wrOmTRWuoB5DpfNkC0rJDU8DqRa6nYL6HK6sytw70QMopt/NIc/9SM7ylItlBWfACXk0tEn37UWM/+mg==",
+ "version": "1.0.30001764",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001764.tgz",
+ "integrity": "sha512-9JGuzl2M+vPL+pz70gtMF9sHdMFbY9FJaQBi186cHKH3pSzDvzoUJUPV6fqiKIMyXbud9ZLg4F3Yza1vJ1+93g==",
"dev": true,
"funding": [
{
@@ -5080,9 +5099,9 @@
"dev": true
},
"node_modules/electron-to-chromium": {
- "version": "1.5.192",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.192.tgz",
- "integrity": "sha512-rP8Ez0w7UNw/9j5eSXCe10o1g/8B1P5SM90PCCMVkIRQn2R0LEHWz4Eh9RnxkniuDe1W0cTSOB3MLlkTGDcuCg==",
+ "version": "1.5.267",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.267.tgz",
+ "integrity": "sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw==",
"dev": true,
"license": "ISC"
},
@@ -5232,10 +5251,11 @@
}
},
"node_modules/es-module-lexer": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.4.1.tgz",
- "integrity": "sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==",
- "dev": true
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.0.0.tgz",
+ "integrity": "sha512-5POEcUuZybH7IdmGsD8wlf0AI55wMecM9rVBTI/qEAy2c1kTOm3DjFYjrBdI2K3BaJjJYfYFeRtM0t9ssnRuxw==",
+ "dev": true,
+ "license": "MIT"
},
"node_modules/es-set-tostringtag": {
"version": "2.0.2",
@@ -5728,6 +5748,13 @@
"node": ">= 4.9.1"
}
},
+ "node_modules/fastparse": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz",
+ "integrity": "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/fastq": {
"version": "1.17.1",
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz",
@@ -6350,6 +6377,50 @@
"uglify-js": "^3.1.4"
}
},
+ "node_modules/handlebars-loader": {
+ "version": "1.7.3",
+ "resolved": "https://registry.npmjs.org/handlebars-loader/-/handlebars-loader-1.7.3.tgz",
+ "integrity": "sha512-dDb+8D51vE3OTSE2wuGPWRAegtsEuw8Mk8hCjtRu/pNcBfN5q+M8ZG3kVJxBuOeBrVElpFStipGmaxSBTRR1mQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "async": "^3.2.2",
+ "fastparse": "^1.0.0",
+ "loader-utils": "1.4.x",
+ "object-assign": "^4.1.0"
+ },
+ "peerDependencies": {
+ "handlebars": ">= 1.3.0 < 5"
+ }
+ },
+ "node_modules/handlebars-loader/node_modules/json5": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
+ "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "minimist": "^1.2.0"
+ },
+ "bin": {
+ "json5": "lib/cli.js"
+ }
+ },
+ "node_modules/handlebars-loader/node_modules/loader-utils": {
+ "version": "1.4.2",
+ "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz",
+ "integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "big.js": "^5.2.2",
+ "emojis-list": "^3.0.0",
+ "json5": "^1.0.1"
+ },
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
"node_modules/hard-rejection": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz",
@@ -8694,12 +8765,17 @@
}
},
"node_modules/loader-runner": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz",
- "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==",
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.1.tgz",
+ "integrity": "sha512-IWqP2SCPhyVFTBtRcgMHdzlf9ul25NwaFx4wCEH/KjAXuuHY4yNjvPXsBokp8jCB936PyWRaPKUNh8NvylLp2Q==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=6.11.5"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
}
},
"node_modules/loader-utils": {
@@ -9366,9 +9442,9 @@
"dev": true
},
"node_modules/node-releases": {
- "version": "2.0.19",
- "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz",
- "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==",
+ "version": "2.0.27",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz",
+ "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==",
"dev": true,
"license": "MIT"
},
@@ -11328,11 +11404,16 @@
"dev": true
},
"node_modules/tapable": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz",
- "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==",
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.0.tgz",
+ "integrity": "sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==",
+ "license": "MIT",
"engines": {
"node": ">=6"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
}
},
"node_modules/temp-fs": {
@@ -11395,9 +11476,9 @@
}
},
"node_modules/terser-webpack-plugin": {
- "version": "5.3.14",
- "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.14.tgz",
- "integrity": "sha512-vkZjpUjb6OMS7dhV+tILUW6BhpDR7P2L/aQSAv+Uwk+m8KATX9EccViHTJR2qDtACKPIYndLGCyl3FMo+r2LMw==",
+ "version": "5.3.16",
+ "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.16.tgz",
+ "integrity": "sha512-h9oBFCWrq78NyWWVcSwZarJkZ01c2AyGrzs1crmHZO3QUg9D61Wu4NPjBy69n7JqylFF5y+CsUZYmYEIZ3mR+Q==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -11443,9 +11524,9 @@
}
},
"node_modules/terser-webpack-plugin/node_modules/schema-utils": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.2.tgz",
- "integrity": "sha512-Gn/JaSk/Mt9gYubxTtSn/QCV4em9mpAPiR1rqy/Ocu19u/G9J5WWdNoUT4SiV6mFC3y6cxyFcFwdzPM3FgxGAQ==",
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.3.tgz",
+ "integrity": "sha512-eflK8wEtyOE6+hsaRVPxvUKYCpRgzLqDTb8krvAsRIwOGlHoSgYLgBXoubGgLd2fT41/OUYdb48v4k4WWHQurA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -11776,9 +11857,9 @@
}
},
"node_modules/update-browserslist-db": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz",
- "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==",
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz",
+ "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==",
"dev": true,
"funding": [
{
@@ -11928,9 +12009,9 @@
}
},
"node_modules/watchpack": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz",
- "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==",
+ "version": "2.5.1",
+ "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.5.1.tgz",
+ "integrity": "sha512-Zn5uXdcFNIA1+1Ei5McRd+iRzfhENPCe7LeABkJtNulSxjma+l7ltNx55BWZkRlwRnpOgHqxnjyaDgJnNXnqzg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -11951,9 +12032,9 @@
}
},
"node_modules/webpack": {
- "version": "5.101.0",
- "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.101.0.tgz",
- "integrity": "sha512-B4t+nJqytPeuZlHuIKTbalhljIFXeNRqrUGAQgTGlfOl2lXXKXw+yZu6bicycP+PUlM44CxBjCFD6aciKFT3LQ==",
+ "version": "5.104.1",
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.104.1.tgz",
+ "integrity": "sha512-Qphch25abbMNtekmEGJmeRUhLDbe+QfiWTiqpKYkpCOWY64v9eyl+KRRLmqOFA2AvKPpc9DC6+u2n76tQLBoaA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -11965,22 +12046,22 @@
"@webassemblyjs/wasm-parser": "^1.14.1",
"acorn": "^8.15.0",
"acorn-import-phases": "^1.0.3",
- "browserslist": "^4.24.0",
+ "browserslist": "^4.28.1",
"chrome-trace-event": "^1.0.2",
- "enhanced-resolve": "^5.17.2",
- "es-module-lexer": "^1.2.1",
+ "enhanced-resolve": "^5.17.4",
+ "es-module-lexer": "^2.0.0",
"eslint-scope": "5.1.1",
"events": "^3.2.0",
"glob-to-regexp": "^0.4.1",
"graceful-fs": "^4.2.11",
"json-parse-even-better-errors": "^2.3.1",
- "loader-runner": "^4.2.0",
+ "loader-runner": "^4.3.1",
"mime-types": "^2.1.27",
"neo-async": "^2.6.2",
- "schema-utils": "^4.3.2",
- "tapable": "^2.1.1",
- "terser-webpack-plugin": "^5.3.11",
- "watchpack": "^2.4.1",
+ "schema-utils": "^4.3.3",
+ "tapable": "^2.3.0",
+ "terser-webpack-plugin": "^5.3.16",
+ "watchpack": "^2.4.4",
"webpack-sources": "^3.3.3"
},
"bin": {
@@ -12128,9 +12209,9 @@
}
},
"node_modules/webpack/node_modules/schema-utils": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.2.tgz",
- "integrity": "sha512-Gn/JaSk/Mt9gYubxTtSn/QCV4em9mpAPiR1rqy/Ocu19u/G9J5WWdNoUT4SiV6mFC3y6cxyFcFwdzPM3FgxGAQ==",
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.3.tgz",
+ "integrity": "sha512-eflK8wEtyOE6+hsaRVPxvUKYCpRgzLqDTb8krvAsRIwOGlHoSgYLgBXoubGgLd2fT41/OUYdb48v4k4WWHQurA==",
"dev": true,
"license": "MIT",
"dependencies": {
diff --git a/package.json b/package.json
index bd94cdd3f..74101b166 100644
--- a/package.json
+++ b/package.json
@@ -44,6 +44,7 @@
"cz-conventional-changelog": "2.1.0",
"dir-compare": "^3.3.0",
"eslint": "^8.56.0",
+ "handlebars-loader": "^1.7.3",
"html-loader": "2.1.1",
"husky": "^9.0.10",
"jest": "^27.2.5",
@@ -58,7 +59,7 @@
"standard-version": "^9.3.0",
"style-loader": "2.0.0",
"typescript": "4.9.4",
- "webpack": "^5.101.0",
+ "webpack": "^5.104.1",
"webpack-cli": "4.5.0",
"webpack-recompilation-simulator": "3.2.0"
},
diff --git a/spec/basic.spec.js b/spec/basic.spec.js
index afcf36144..648c7944f 100644
--- a/spec/basic.spec.js
+++ b/spec/basic.spec.js
@@ -246,7 +246,7 @@ describe("HtmlWebpackPlugin", () => {
);
});
- it("uses a custom loader from webpack config", (done) => {
+ it("uses a custom loader from webpack config (pug)", (done) => {
testHtmlPlugin(
{
mode: "production",
@@ -273,6 +273,33 @@ describe("HtmlWebpackPlugin", () => {
);
});
+ it("uses a custom loader from webpack config (handlebars)", (done) => {
+ testHtmlPlugin(
+ {
+ mode: "production",
+ entry: {
+ app: path.join(__dirname, "fixtures/index.js"),
+ },
+ module: {
+ rules: [{ test: /\.hbs$/, loader: "handlebars-loader" }],
+ },
+ output: {
+ path: OUTPUT_DIR,
+ filename: "[name]_bundle.js",
+ },
+ plugins: [
+ new HtmlWebpackPlugin({
+ inject: false,
+ template: path.join(__dirname, "fixtures/template.hbs"),
+ }),
+ ],
+ },
+ ['
+ {{/each}}
+