Skip to content

Commit 053c6e6

Browse files
committed
chore: update snapshot tests for webpack 5.4.0
1 parent 9c7fba0 commit 053c6e6

File tree

15 files changed

+141
-141
lines changed

15 files changed

+141
-141
lines changed

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

+51-57
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ document.body.appendChild(h1);
2222
/******/ // The require function
2323
/******/ function __webpack_require__(moduleId) {
2424
/******/ // Check if module is in cache
25-
/******/ if(__webpack_module_cache__[moduleId]) {
26-
/******/ return __webpack_module_cache__[moduleId].exports;
25+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
26+
/******/ if (cachedModule !== undefined) {
27+
/******/ return cachedModule.exports;
2728
/******/ }
2829
/******/ // Create a new module (and put it into the cache)
2930
/******/ var module = __webpack_module_cache__[moduleId] = {
@@ -42,10 +43,38 @@ document.body.appendChild(h1);
4243
/******/ // expose the modules object (__webpack_modules__)
4344
/******/ __webpack_require__.m = __webpack_modules__;
4445
/******/
45-
/******/ // the startup function
46-
/******/ // It's empty as some runtime module handles the default behavior
47-
/******/ __webpack_require__.x = x => {};
4846
/************************************************************************/
47+
/******/ /* webpack/runtime/chunk loaded */
48+
/******/ (() => {
49+
/******/ var deferred = [];
50+
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
51+
/******/ if(chunkIds) {
52+
/******/ priority = priority || 0;
53+
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
54+
/******/ deferred[i] = [chunkIds, fn, priority];
55+
/******/ return;
56+
/******/ }
57+
/******/ var notFulfilled = Infinity;
58+
/******/ for (var i = 0; i < deferred.length; i++) {
59+
/******/ var [chunkIds, fn, priority] = deferred[i];
60+
/******/ var fulfilled = true;
61+
/******/ for (var j = 0; j < chunkIds.length; j++) {
62+
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
63+
/******/ chunkIds.splice(j--, 1);
64+
/******/ } else {
65+
/******/ fulfilled = false;
66+
/******/ if(priority < notFulfilled) notFulfilled = priority;
67+
/******/ }
68+
/******/ }
69+
/******/ if(fulfilled) {
70+
/******/ deferred.splice(i--, 1)
71+
/******/ result = fn();
72+
/******/ }
73+
/******/ }
74+
/******/ return result;
75+
/******/ };
76+
/******/ })();
77+
/******/
4978
/******/ /* webpack/runtime/compat get default export */
5079
/******/ (() => {
5180
/******/ // getDefaultExport function for compatibility with non-harmony modules
@@ -92,14 +121,11 @@ document.body.appendChild(h1);
92121
/******/
93122
/******/ // object to store loaded and loading chunks
94123
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
95-
/******/ // Promise = chunk loading, 0 = chunk loaded
124+
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
96125
/******/ var installedChunks = {
97126
/******/ 938: 0
98127
/******/ };
99128
/******/
100-
/******/ var deferredModules = [
101-
/******/ [727,494,491,219,965]
102-
/******/ ];
103129
/******/ // no chunk on demand loading
104130
/******/
105131
/******/ // no prefetching
@@ -110,75 +136,43 @@ document.body.appendChild(h1);
110136
/******/
111137
/******/ // no HMR manifest
112138
/******/
113-
/******/ var checkDeferredModules = x => {};
139+
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
114140
/******/
115141
/******/ // install a JSONP callback for chunk loading
116142
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
117-
/******/ var [chunkIds, moreModules, runtime, executeModules] = data;
143+
/******/ var [chunkIds, moreModules, runtime] = data;
118144
/******/ // add "moreModules" to the modules object,
119145
/******/ // then flag all "chunkIds" as loaded and fire callback
120-
/******/ var moduleId, chunkId, i = 0, resolves = [];
121-
/******/ for(;i < chunkIds.length; i++) {
122-
/******/ chunkId = chunkIds[i];
123-
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
124-
/******/ resolves.push(installedChunks[chunkId][0]);
125-
/******/ }
126-
/******/ installedChunks[chunkId] = 0;
127-
/******/ }
146+
/******/ var moduleId, chunkId, i = 0;
128147
/******/ for(moduleId in moreModules) {
129148
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
130149
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
131150
/******/ }
132151
/******/ }
133-
/******/ if(runtime) runtime(__webpack_require__);
152+
/******/ if(runtime) var result = runtime(__webpack_require__);
134153
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
135-
/******/ while(resolves.length) {
136-
/******/ resolves.shift()();
154+
/******/ for(;i < chunkIds.length; i++) {
155+
/******/ chunkId = chunkIds[i];
156+
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
157+
/******/ installedChunks[chunkId][0]();
158+
/******/ }
159+
/******/ installedChunks[chunkIds[i]] = 0;
137160
/******/ }
138-
/******/
139-
/******/ // add entry modules from loaded chunk to deferred list
140-
/******/ if(executeModules) deferredModules.push.apply(deferredModules, executeModules);
141-
/******/
142-
/******/ // run deferred modules when all chunks ready
143-
/******/ return checkDeferredModules();
161+
/******/ return __webpack_require__.O(result);
144162
/******/ }
145163
/******/
146164
/******/ var chunkLoadingGlobal = self["webpackChunk"] = self["webpackChunk"] || [];
147165
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
148166
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
149-
/******/
150-
/******/ function checkDeferredModulesImpl() {
151-
/******/ var result;
152-
/******/ for(var i = 0; i < deferredModules.length; i++) {
153-
/******/ var deferredModule = deferredModules[i];
154-
/******/ var fulfilled = true;
155-
/******/ for(var j = 1; j < deferredModule.length; j++) {
156-
/******/ var depId = deferredModule[j];
157-
/******/ if(installedChunks[depId] !== 0) fulfilled = false;
158-
/******/ }
159-
/******/ if(fulfilled) {
160-
/******/ deferredModules.splice(i--, 1);
161-
/******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
162-
/******/ }
163-
/******/ }
164-
/******/ if(deferredModules.length === 0) {
165-
/******/ __webpack_require__.x();
166-
/******/ __webpack_require__.x = x => {};
167-
/******/ }
168-
/******/ return result;
169-
/******/ }
170-
/******/ var startup = __webpack_require__.x;
171-
/******/ __webpack_require__.x = () => {
172-
/******/ // reset startup function so it can be called again when more startup code is added
173-
/******/ __webpack_require__.x = startup || (x => {});
174-
/******/ return (checkDeferredModules = checkDeferredModulesImpl)();
175-
/******/ };
176167
/******/ })();
177168
/******/
178169
/************************************************************************/
179170
/******/
180-
/******/ // run startup
181-
/******/ var __webpack_exports__ = __webpack_require__.x();
171+
/******/ // startup
172+
/******/ // Load entry module and return exports
173+
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
174+
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, [494,491,219,965], () => (__webpack_require__(727)))
175+
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
182176
/******/
183177
/******/ })()
184178
;

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

+51-57
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ document.body.appendChild(h1);
2121
/******/ // The require function
2222
/******/ function __webpack_require__(moduleId) {
2323
/******/ // Check if module is in cache
24-
/******/ if(__webpack_module_cache__[moduleId]) {
25-
/******/ return __webpack_module_cache__[moduleId].exports;
24+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
25+
/******/ if (cachedModule !== undefined) {
26+
/******/ return cachedModule.exports;
2627
/******/ }
2728
/******/ // Create a new module (and put it into the cache)
2829
/******/ var module = __webpack_module_cache__[moduleId] = {
@@ -41,10 +42,38 @@ document.body.appendChild(h1);
4142
/******/ // expose the modules object (__webpack_modules__)
4243
/******/ __webpack_require__.m = __webpack_modules__;
4344
/******/
44-
/******/ // the startup function
45-
/******/ // It's empty as some runtime module handles the default behavior
46-
/******/ __webpack_require__.x = x => {};
4745
/************************************************************************/
46+
/******/ /* webpack/runtime/chunk loaded */
47+
/******/ (() => {
48+
/******/ var deferred = [];
49+
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
50+
/******/ if(chunkIds) {
51+
/******/ priority = priority || 0;
52+
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
53+
/******/ deferred[i] = [chunkIds, fn, priority];
54+
/******/ return;
55+
/******/ }
56+
/******/ var notFulfilled = Infinity;
57+
/******/ for (var i = 0; i < deferred.length; i++) {
58+
/******/ var [chunkIds, fn, priority] = deferred[i];
59+
/******/ var fulfilled = true;
60+
/******/ for (var j = 0; j < chunkIds.length; j++) {
61+
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
62+
/******/ chunkIds.splice(j--, 1);
63+
/******/ } else {
64+
/******/ fulfilled = false;
65+
/******/ if(priority < notFulfilled) notFulfilled = priority;
66+
/******/ }
67+
/******/ }
68+
/******/ if(fulfilled) {
69+
/******/ deferred.splice(i--, 1)
70+
/******/ result = fn();
71+
/******/ }
72+
/******/ }
73+
/******/ return result;
74+
/******/ };
75+
/******/ })();
76+
/******/
4877
/******/ /* webpack/runtime/compat get default export */
4978
/******/ (() => {
5079
/******/ // getDefaultExport function for compatibility with non-harmony modules
@@ -91,14 +120,11 @@ document.body.appendChild(h1);
91120
/******/
92121
/******/ // object to store loaded and loading chunks
93122
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
94-
/******/ // Promise = chunk loading, 0 = chunk loaded
123+
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
95124
/******/ var installedChunks = {
96125
/******/ 513: 0
97126
/******/ };
98127
/******/
99-
/******/ var deferredModules = [
100-
/******/ [282,494,219,965]
101-
/******/ ];
102128
/******/ // no chunk on demand loading
103129
/******/
104130
/******/ // no prefetching
@@ -109,75 +135,43 @@ document.body.appendChild(h1);
109135
/******/
110136
/******/ // no HMR manifest
111137
/******/
112-
/******/ var checkDeferredModules = x => {};
138+
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
113139
/******/
114140
/******/ // install a JSONP callback for chunk loading
115141
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
116-
/******/ var [chunkIds, moreModules, runtime, executeModules] = data;
142+
/******/ var [chunkIds, moreModules, runtime] = data;
117143
/******/ // add "moreModules" to the modules object,
118144
/******/ // then flag all "chunkIds" as loaded and fire callback
119-
/******/ var moduleId, chunkId, i = 0, resolves = [];
120-
/******/ for(;i < chunkIds.length; i++) {
121-
/******/ chunkId = chunkIds[i];
122-
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
123-
/******/ resolves.push(installedChunks[chunkId][0]);
124-
/******/ }
125-
/******/ installedChunks[chunkId] = 0;
126-
/******/ }
145+
/******/ var moduleId, chunkId, i = 0;
127146
/******/ for(moduleId in moreModules) {
128147
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
129148
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
130149
/******/ }
131150
/******/ }
132-
/******/ if(runtime) runtime(__webpack_require__);
151+
/******/ if(runtime) var result = runtime(__webpack_require__);
133152
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
134-
/******/ while(resolves.length) {
135-
/******/ resolves.shift()();
153+
/******/ for(;i < chunkIds.length; i++) {
154+
/******/ chunkId = chunkIds[i];
155+
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
156+
/******/ installedChunks[chunkId][0]();
157+
/******/ }
158+
/******/ installedChunks[chunkIds[i]] = 0;
136159
/******/ }
137-
/******/
138-
/******/ // add entry modules from loaded chunk to deferred list
139-
/******/ if(executeModules) deferredModules.push.apply(deferredModules, executeModules);
140-
/******/
141-
/******/ // run deferred modules when all chunks ready
142-
/******/ return checkDeferredModules();
160+
/******/ return __webpack_require__.O(result);
143161
/******/ }
144162
/******/
145163
/******/ var chunkLoadingGlobal = self["webpackChunk"] = self["webpackChunk"] || [];
146164
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
147165
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
148-
/******/
149-
/******/ function checkDeferredModulesImpl() {
150-
/******/ var result;
151-
/******/ for(var i = 0; i < deferredModules.length; i++) {
152-
/******/ var deferredModule = deferredModules[i];
153-
/******/ var fulfilled = true;
154-
/******/ for(var j = 1; j < deferredModule.length; j++) {
155-
/******/ var depId = deferredModule[j];
156-
/******/ if(installedChunks[depId] !== 0) fulfilled = false;
157-
/******/ }
158-
/******/ if(fulfilled) {
159-
/******/ deferredModules.splice(i--, 1);
160-
/******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
161-
/******/ }
162-
/******/ }
163-
/******/ if(deferredModules.length === 0) {
164-
/******/ __webpack_require__.x();
165-
/******/ __webpack_require__.x = x => {};
166-
/******/ }
167-
/******/ return result;
168-
/******/ }
169-
/******/ var startup = __webpack_require__.x;
170-
/******/ __webpack_require__.x = () => {
171-
/******/ // reset startup function so it can be called again when more startup code is added
172-
/******/ __webpack_require__.x = startup || (x => {});
173-
/******/ return (checkDeferredModules = checkDeferredModulesImpl)();
174-
/******/ };
175166
/******/ })();
176167
/******/
177168
/************************************************************************/
178169
/******/
179-
/******/ // run startup
180-
/******/ var __webpack_exports__ = __webpack_require__.x();
170+
/******/ // startup
171+
/******/ // Load entry module and return exports
172+
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
173+
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, [494,219,965], () => (__webpack_require__(282)))
174+
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
181175
/******/
182176
/******/ })()
183177
;

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ __webpack_require__.r(__webpack_exports__);
1919
/******/ // The require function
2020
/******/ function __webpack_require__(moduleId) {
2121
/******/ // Check if module is in cache
22-
/******/ if(__webpack_module_cache__[moduleId]) {
23-
/******/ return __webpack_module_cache__[moduleId].exports;
22+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
23+
/******/ if (cachedModule !== undefined) {
24+
/******/ return cachedModule.exports;
2425
/******/ }
2526
/******/ // Create a new module (and put it into the cache)
2627
/******/ var module = __webpack_module_cache__[moduleId] = {

examples/default/dist/webpack-5/bundle.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,9 @@ module.exports = function (list, options) {
405405
/******/ // The require function
406406
/******/ function __webpack_require__(moduleId) {
407407
/******/ // Check if module is in cache
408-
/******/ if(__webpack_module_cache__[moduleId]) {
409-
/******/ return __webpack_module_cache__[moduleId].exports;
408+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
409+
/******/ if (cachedModule !== undefined) {
410+
/******/ return cachedModule.exports;
410411
/******/ }
411412
/******/ // Create a new module (and put it into the cache)
412413
/******/ var module = __webpack_module_cache__[moduleId] = {

examples/favicon/dist/webpack-5/bundle.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ __webpack_require__.r(__webpack_exports__);
1919
/******/ // The require function
2020
/******/ function __webpack_require__(moduleId) {
2121
/******/ // Check if module is in cache
22-
/******/ if(__webpack_module_cache__[moduleId]) {
23-
/******/ return __webpack_module_cache__[moduleId].exports;
22+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
23+
/******/ if (cachedModule !== undefined) {
24+
/******/ return cachedModule.exports;
2425
/******/ }
2526
/******/ // Create a new module (and put it into the cache)
2627
/******/ var module = __webpack_module_cache__[moduleId] = {

examples/html-loader/dist/webpack-5/bundle.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ __webpack_require__.r(__webpack_exports__);
1919
/******/ // The require function
2020
/******/ function __webpack_require__(moduleId) {
2121
/******/ // Check if module is in cache
22-
/******/ if(__webpack_module_cache__[moduleId]) {
23-
/******/ return __webpack_module_cache__[moduleId].exports;
22+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
23+
/******/ if (cachedModule !== undefined) {
24+
/******/ return cachedModule.exports;
2425
/******/ }
2526
/******/ // Create a new module (and put it into the cache)
2627
/******/ var module = __webpack_module_cache__[moduleId] = {

examples/inline/dist/webpack-5/bundle.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ __webpack_require__.r(__webpack_exports__);
1919
/******/ // The require function
2020
/******/ function __webpack_require__(moduleId) {
2121
/******/ // Check if module is in cache
22-
/******/ if(__webpack_module_cache__[moduleId]) {
23-
/******/ return __webpack_module_cache__[moduleId].exports;
22+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
23+
/******/ if (cachedModule !== undefined) {
24+
/******/ return cachedModule.exports;
2425
/******/ }
2526
/******/ // Create a new module (and put it into the cache)
2627
/******/ var module = __webpack_module_cache__[moduleId] = {

examples/inline/dist/webpack-5/index.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@
2121
/******/ // The require function
2222
/******/ function __webpack_require__(moduleId) {
2323
/******/ // Check if module is in cache
24-
/******/ if(__webpack_module_cache__[moduleId]) {
25-
/******/ return __webpack_module_cache__[moduleId].exports;
24+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
25+
/******/ if (cachedModule !== undefined) {
26+
/******/ return cachedModule.exports;
2627
/******/ }
2728
/******/ // Create a new module (and put it into the cache)
2829
/******/ var module = __webpack_module_cache__[moduleId] = {

0 commit comments

Comments
 (0)