Skip to content

Commit ccbe93a

Browse files
committed
chore: update examples to latest webpack version
1 parent 33cbd59 commit ccbe93a

File tree

4 files changed

+72
-78
lines changed

4 files changed

+72
-78
lines changed

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

+35-38
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ document.body.appendChild(h1);
4242
/******/ // expose the modules object (__webpack_modules__)
4343
/******/ __webpack_require__.m = __webpack_modules__;
4444
/******/
45+
/******/ // the startup function
46+
/******/ // It's empty as some runtime module handles the default behavior
47+
/******/ __webpack_require__.x = x => {}
4548
/************************************************************************/
4649
/******/ /* webpack/runtime/compat get default export */
4750
/******/ (() => {
@@ -107,43 +110,10 @@ document.body.appendChild(h1);
107110
/******/
108111
/******/ // no HMR manifest
109112
/******/
110-
/******/ var checkDeferredModules = () => {
111-
/******/
112-
/******/ };
113-
/******/ function checkDeferredModulesImpl() {
114-
/******/ var result;
115-
/******/ for(var i = 0; i < deferredModules.length; i++) {
116-
/******/ var deferredModule = deferredModules[i];
117-
/******/ var fulfilled = true;
118-
/******/ for(var j = 1; j < deferredModule.length; j++) {
119-
/******/ var depId = deferredModule[j];
120-
/******/ if(installedChunks[depId] !== 0) fulfilled = false;
121-
/******/ }
122-
/******/ if(fulfilled) {
123-
/******/ deferredModules.splice(i--, 1);
124-
/******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
125-
/******/ }
126-
/******/ }
127-
/******/ if(deferredModules.length === 0) {
128-
/******/ __webpack_require__.x();
129-
/******/ __webpack_require__.x = () => {
130-
/******/
131-
/******/ }
132-
/******/ }
133-
/******/ return result;
134-
/******/ }
135-
/******/ __webpack_require__.x = () => {
136-
/******/ // reset startup function so it can be called again when more startup code is added
137-
/******/ __webpack_require__.x = () => {
138-
/******/
139-
/******/ }
140-
/******/ chunkLoadingGlobal = chunkLoadingGlobal.slice();
141-
/******/ for(var i = 0; i < chunkLoadingGlobal.length; i++) webpackJsonpCallback(chunkLoadingGlobal[i]);
142-
/******/ return (checkDeferredModules = checkDeferredModulesImpl)();
143-
/******/ };
113+
/******/ var checkDeferredModules = x => {};
144114
/******/
145115
/******/ // install a JSONP callback for chunk loading
146-
/******/ var webpackJsonpCallback = (data) => {
116+
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
147117
/******/ var [chunkIds, moreModules, runtime, executeModules] = data;
148118
/******/ // add "moreModules" to the modules object,
149119
/******/ // then flag all "chunkIds" as loaded and fire callback
@@ -161,7 +131,7 @@ document.body.appendChild(h1);
161131
/******/ }
162132
/******/ }
163133
/******/ if(runtime) runtime(__webpack_require__);
164-
/******/ parentChunkLoadingFunction(data);
134+
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
165135
/******/ while(resolves.length) {
166136
/******/ resolves.shift()();
167137
/******/ }
@@ -174,8 +144,35 @@ document.body.appendChild(h1);
174144
/******/ }
175145
/******/
176146
/******/ var chunkLoadingGlobal = self["webpackChunk"] = self["webpackChunk"] || [];
177-
/******/ var parentChunkLoadingFunction = chunkLoadingGlobal.push.bind(chunkLoadingGlobal);
178-
/******/ chunkLoadingGlobal.push = webpackJsonpCallback;
147+
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
148+
/******/ 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+
/******/ };
179176
/******/ })();
180177
/******/
181178
/************************************************************************/

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

+35-38
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ document.body.appendChild(h1);
4141
/******/ // expose the modules object (__webpack_modules__)
4242
/******/ __webpack_require__.m = __webpack_modules__;
4343
/******/
44+
/******/ // the startup function
45+
/******/ // It's empty as some runtime module handles the default behavior
46+
/******/ __webpack_require__.x = x => {}
4447
/************************************************************************/
4548
/******/ /* webpack/runtime/compat get default export */
4649
/******/ (() => {
@@ -106,43 +109,10 @@ document.body.appendChild(h1);
106109
/******/
107110
/******/ // no HMR manifest
108111
/******/
109-
/******/ var checkDeferredModules = () => {
110-
/******/
111-
/******/ };
112-
/******/ function checkDeferredModulesImpl() {
113-
/******/ var result;
114-
/******/ for(var i = 0; i < deferredModules.length; i++) {
115-
/******/ var deferredModule = deferredModules[i];
116-
/******/ var fulfilled = true;
117-
/******/ for(var j = 1; j < deferredModule.length; j++) {
118-
/******/ var depId = deferredModule[j];
119-
/******/ if(installedChunks[depId] !== 0) fulfilled = false;
120-
/******/ }
121-
/******/ if(fulfilled) {
122-
/******/ deferredModules.splice(i--, 1);
123-
/******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
124-
/******/ }
125-
/******/ }
126-
/******/ if(deferredModules.length === 0) {
127-
/******/ __webpack_require__.x();
128-
/******/ __webpack_require__.x = () => {
129-
/******/
130-
/******/ }
131-
/******/ }
132-
/******/ return result;
133-
/******/ }
134-
/******/ __webpack_require__.x = () => {
135-
/******/ // reset startup function so it can be called again when more startup code is added
136-
/******/ __webpack_require__.x = () => {
137-
/******/
138-
/******/ }
139-
/******/ chunkLoadingGlobal = chunkLoadingGlobal.slice();
140-
/******/ for(var i = 0; i < chunkLoadingGlobal.length; i++) webpackJsonpCallback(chunkLoadingGlobal[i]);
141-
/******/ return (checkDeferredModules = checkDeferredModulesImpl)();
142-
/******/ };
112+
/******/ var checkDeferredModules = x => {};
143113
/******/
144114
/******/ // install a JSONP callback for chunk loading
145-
/******/ var webpackJsonpCallback = (data) => {
115+
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
146116
/******/ var [chunkIds, moreModules, runtime, executeModules] = data;
147117
/******/ // add "moreModules" to the modules object,
148118
/******/ // then flag all "chunkIds" as loaded and fire callback
@@ -160,7 +130,7 @@ document.body.appendChild(h1);
160130
/******/ }
161131
/******/ }
162132
/******/ if(runtime) runtime(__webpack_require__);
163-
/******/ parentChunkLoadingFunction(data);
133+
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
164134
/******/ while(resolves.length) {
165135
/******/ resolves.shift()();
166136
/******/ }
@@ -173,8 +143,35 @@ document.body.appendChild(h1);
173143
/******/ }
174144
/******/
175145
/******/ var chunkLoadingGlobal = self["webpackChunk"] = self["webpackChunk"] || [];
176-
/******/ var parentChunkLoadingFunction = chunkLoadingGlobal.push.bind(chunkLoadingGlobal);
177-
/******/ chunkLoadingGlobal.push = webpackJsonpCallback;
146+
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
147+
/******/ 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+
/******/ };
178175
/******/ })();
179176
/******/
180177
/************************************************************************/

examples/javascript-advanced/dist/webpack-5/bundle.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
3-
* This devtool is not neither made for production nor for readable output files.
3+
* This devtool is neither made for production nor for readable output files.
44
* It uses "eval()" calls to create a separate source file in the browser devtools.
55
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
66
* or disable the default devtool with "devtool: false".
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<head><script defer="defer" src="bundle.js"></script><link href="styles.css" rel="stylesheet"></head>Hello World from backend2021-01-03T13:42:53.425Z<h2>Partial</h2><img src="55b19870aff2e53d1fb1.png">
1+
<head><script defer="defer" src="bundle.js"></script><link href="styles.css" rel="stylesheet"></head>Hello World from backend2021-01-14T14:20:54.163Z<h2>Partial</h2><img src="55b19870aff2e53d1fb1.png">

0 commit comments

Comments
 (0)