Skip to content

Commit a8e563b

Browse files
fix: compatibility with handlebars-loader (#1882)
1 parent 9a39db8 commit a8e563b

File tree

28 files changed

+672
-525
lines changed

28 files changed

+672
-525
lines changed

.cspell.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
"Bfile",
2727
"webpackconfig",
2828
"specialattribute",
29-
"dircompare"
29+
"dircompare",
30+
"wagoid",
31+
"autocrlf"
3032
],
3133
"ignorePaths": [
3234
"CHANGELOG.md",

.github/workflows/main.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,18 @@ jobs:
5959

6060
strategy:
6161
matrix:
62-
node: ["10.x", "12.x", "14.x", "16.x", "18.x", "20.x"]
62+
node:
63+
[
64+
"10.x",
65+
"12.x",
66+
"14.x",
67+
"16.x",
68+
"18.x",
69+
"20.x",
70+
"22.x",
71+
"24.x",
72+
"25.x",
73+
]
6374
os: [ubuntu-latest, windows-latest, macOS-latest]
6475
webpack: [latest]
6576

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,8 @@
11
"use strict";
22
(self["webpackChunk"] = self["webpackChunk"] || []).push([[192],{
33

4-
/***/ 810:
5-
/***/ ((module, __webpack_exports__, __webpack_require__) => {
6-
7-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
8-
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
9-
/* harmony export */ });
10-
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(935);
11-
/* 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__);
12-
// Imports
13-
14-
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
15-
// Module
16-
___CSS_LOADER_EXPORT___.push([module.id, "body {\n background: snow;\n}\n", ""]);
17-
// Exports
18-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
19-
20-
21-
/***/ }),
22-
23-
/***/ 192:
24-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4+
/***/ 192
5+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
256

267
__webpack_require__.r(__webpack_exports__);
278
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
@@ -44,6 +25,25 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
4425

4526
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_main_css__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.locals || {});
4627

47-
/***/ })
28+
/***/ },
29+
30+
/***/ 810
31+
(module, __webpack_exports__, __webpack_require__) {
32+
33+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
34+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
35+
/* harmony export */ });
36+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(935);
37+
/* 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__);
38+
// Imports
39+
40+
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
41+
// Module
42+
___CSS_LOADER_EXPORT___.push([module.id, "body {\n background: snow;\n}\n", ""]);
43+
// Exports
44+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
45+
46+
47+
/***/ }
4848

4949
}]);

examples/chunk-optimization/dist/webpack-5/461.js

Lines changed: 75 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,8 @@
11
"use strict";
22
(self["webpackChunk"] = self["webpackChunk"] || []).push([[461],{
33

4-
/***/ 935:
5-
/***/ ((module) => {
6-
7-
8-
9-
/*
10-
MIT License http://www.opensource.org/licenses/mit-license.php
11-
Author Tobias Koppers @sokra
12-
*/
13-
// css base code, injected by the css-loader
14-
// eslint-disable-next-line func-names
15-
module.exports = function (cssWithMappingToString) {
16-
var list = []; // return the list of modules as css string
17-
18-
list.toString = function toString() {
19-
return this.map(function (item) {
20-
var content = cssWithMappingToString(item);
21-
22-
if (item[2]) {
23-
return "@media ".concat(item[2], " {").concat(content, "}");
24-
}
25-
26-
return content;
27-
}).join('');
28-
}; // import a list of modules into the list
29-
// eslint-disable-next-line func-names
30-
31-
32-
list.i = function (modules, mediaQuery, dedupe) {
33-
if (typeof modules === 'string') {
34-
// eslint-disable-next-line no-param-reassign
35-
modules = [[null, modules, '']];
36-
}
37-
38-
var alreadyImportedModules = {};
39-
40-
if (dedupe) {
41-
for (var i = 0; i < this.length; i++) {
42-
// eslint-disable-next-line prefer-destructuring
43-
var id = this[i][0];
44-
45-
if (id != null) {
46-
alreadyImportedModules[id] = true;
47-
}
48-
}
49-
}
50-
51-
for (var _i = 0; _i < modules.length; _i++) {
52-
var item = [].concat(modules[_i]);
53-
54-
if (dedupe && alreadyImportedModules[item[0]]) {
55-
// eslint-disable-next-line no-continue
56-
continue;
57-
}
58-
59-
if (mediaQuery) {
60-
if (!item[2]) {
61-
item[2] = mediaQuery;
62-
} else {
63-
item[2] = "".concat(mediaQuery, " and ").concat(item[2]);
64-
}
65-
}
66-
67-
list.push(item);
68-
}
69-
};
70-
71-
return list;
72-
};
73-
74-
/***/ }),
75-
76-
/***/ 591:
77-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4+
/***/ 591
5+
(module, __unused_webpack_exports, __webpack_require__) {
786

797

808

@@ -346,6 +274,78 @@ module.exports = function (list, options) {
346274
};
347275
};
348276

349-
/***/ })
277+
/***/ },
278+
279+
/***/ 935
280+
(module) {
281+
282+
283+
284+
/*
285+
MIT License http://www.opensource.org/licenses/mit-license.php
286+
Author Tobias Koppers @sokra
287+
*/
288+
// css base code, injected by the css-loader
289+
// eslint-disable-next-line func-names
290+
module.exports = function (cssWithMappingToString) {
291+
var list = []; // return the list of modules as css string
292+
293+
list.toString = function toString() {
294+
return this.map(function (item) {
295+
var content = cssWithMappingToString(item);
296+
297+
if (item[2]) {
298+
return "@media ".concat(item[2], " {").concat(content, "}");
299+
}
300+
301+
return content;
302+
}).join('');
303+
}; // import a list of modules into the list
304+
// eslint-disable-next-line func-names
305+
306+
307+
list.i = function (modules, mediaQuery, dedupe) {
308+
if (typeof modules === 'string') {
309+
// eslint-disable-next-line no-param-reassign
310+
modules = [[null, modules, '']];
311+
}
312+
313+
var alreadyImportedModules = {};
314+
315+
if (dedupe) {
316+
for (var i = 0; i < this.length; i++) {
317+
// eslint-disable-next-line prefer-destructuring
318+
var id = this[i][0];
319+
320+
if (id != null) {
321+
alreadyImportedModules[id] = true;
322+
}
323+
}
324+
}
325+
326+
for (var _i = 0; _i < modules.length; _i++) {
327+
var item = [].concat(modules[_i]);
328+
329+
if (dedupe && alreadyImportedModules[item[0]]) {
330+
// eslint-disable-next-line no-continue
331+
continue;
332+
}
333+
334+
if (mediaQuery) {
335+
if (!item[2]) {
336+
item[2] = mediaQuery;
337+
} else {
338+
item[2] = "".concat(mediaQuery, " and ").concat(item[2]);
339+
}
340+
}
341+
342+
list.push(item);
343+
}
344+
};
345+
346+
return list;
347+
};
348+
349+
/***/ }
350350

351351
}]);

examples/chunk-optimization/dist/webpack-5/entryA.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/******/ (() => { // webpackBootstrap
22
/******/ var __webpack_modules__ = ({
33

4-
/***/ 910:
5-
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
4+
/***/ 910
5+
(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
66

77
__webpack_require__(192);
88
var multiply = __webpack_require__(199);
@@ -12,7 +12,7 @@ h1.innerHTML = concat("Hello world from Entry ", multiply(1, 1));
1212
document.body.appendChild(h1);
1313

1414

15-
/***/ })
15+
/***/ }
1616

1717
/******/ });
1818
/************************************************************************/

examples/chunk-optimization/dist/webpack-5/entryB.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/******/ (() => { // webpackBootstrap
22
/******/ var __webpack_modules__ = ({
33

4-
/***/ 123:
5-
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
4+
/***/ 123
5+
(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
66

77
__webpack_require__(192);
88
var multiply = __webpack_require__(199);
@@ -11,7 +11,7 @@ h1.innerHTML = "Hello world from Entry " + multiply(1, 2);
1111
document.body.appendChild(h1);
1212

1313

14-
/***/ })
14+
/***/ }
1515

1616
/******/ });
1717
/************************************************************************/
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
(self["webpackChunk"] = self["webpackChunk"] || []).push([[646],{
22

3-
/***/ 199:
4-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3+
/***/ 16
4+
(module) {
5+
6+
module.exports = function sum(a, b) {
7+
return a + b;
8+
};
9+
10+
11+
/***/ },
12+
13+
/***/ 199
14+
(module, __unused_webpack_exports, __webpack_require__) {
515

616
var sum = __webpack_require__(16);
717
module.exports = function multiply(a, b) {
@@ -13,16 +23,6 @@ module.exports = function multiply(a, b) {
1323
};
1424

1525

16-
/***/ }),
17-
18-
/***/ 16:
19-
/***/ ((module) => {
20-
21-
module.exports = function sum(a, b) {
22-
return a + b;
23-
};
24-
25-
26-
/***/ })
26+
/***/ }
2727

2828
}]);
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
(self["webpackChunk"] = self["webpackChunk"] || []).push([[209],{
22

3-
/***/ 631:
4-
/***/ ((module) => {
3+
/***/ 631
4+
(module) {
55

66
module.exports = function concat(a, b) {
77
return String(a) + String(b);
88
};
99

1010

11-
/***/ })
11+
/***/ }
1212

1313
}]);

examples/custom-template/dist/webpack-5/bundle.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
/******/ (() => { // webpackBootstrap
22
/******/ var __webpack_modules__ = ({
33

4-
/***/ 969:
5-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4+
/***/ 969
5+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
66

77
"use strict";
88
__webpack_require__.r(__webpack_exports__);
99
// extracted by mini-css-extract-plugin
1010

1111

12-
/***/ })
12+
/***/ }
1313

1414
/******/ });
1515
/************************************************************************/

0 commit comments

Comments
 (0)