diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml new file mode 100644 index 000000000..b4a5a6c44 --- /dev/null +++ b/.github/workflows/examples.yml @@ -0,0 +1,39 @@ +name: "Update examples" + +# 0 0 * * 0 +on: + schedule: + - cron: "*/5 * * * *" + +permissions: + contents: read + +jobs: + examples: + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: lts/* + cache: "yarn" + - run: yarn --frozen-lockfile + - run: yarn link --frozen-lockfile || true + - run: yarn link webpack --frozen-lockfile + - run: build:examples + - name: Create Pull Request + uses: peter-evans/create-pull-request@v7 + with: + token: ${{ secrets.PAT }} + delete-branch: true + commit-message: | + docs: update examples + title: Update examples + body: | + - Example updates + branch: update-examples diff --git a/examples/aggressive-merging/README.md b/examples/aggressive-merging/README.md index 959c46324..6c0c3e8dc 100644 --- a/examples/aggressive-merging/README.md +++ b/examples/aggressive-merging/README.md @@ -29,8 +29,8 @@ a big file... # webpack.config.js ```javascript -var path = require("path"); -var { AggressiveMergingPlugin } = require("../../").optimize; +const path = require("path"); +const { AggressiveMergingPlugin } = require("../..").optimize; module.exports = { // mode: "development" || "production", @@ -60,24 +60,12 @@ module.exports = { ## Unoptimized ``` -asset pageA.bundle.js 8.9 KiB [emitted] (name: pageA) -asset pageB.bundle.js 8.9 KiB [emitted] (name: pageB) -asset pageC.bundle.js 8.9 KiB [emitted] (name: pageC) -asset 456.chunk.js 6.28 KiB [emitted] -asset 394.chunk.js 606 bytes [emitted] -chunk (runtime: pageB) pageB.bundle.js (pageB) 69 bytes (javascript) 4.97 KiB (runtime) [entry] [rendered] - > ./pageB pageB - runtime modules 4.97 KiB 6 modules - ./pageB.js 69 bytes [built] [code generated] - [used exports unknown] - entry ./pageB pageB -chunk (runtime: pageC) pageC.bundle.js (pageC) 68 bytes (javascript) 4.97 KiB (runtime) [entry] [rendered] - > ./pageC pageC - runtime modules 4.97 KiB 6 modules - ./pageC.js 68 bytes [built] [code generated] - [used exports unknown] - entry ./pageC pageC -chunk (runtime: pageC) 394.chunk.js 42 bytes [rendered] +asset pageA.bundle.js 8.85 KiB [emitted] (name: pageA) +asset pageB.bundle.js 8.85 KiB [emitted] (name: pageB) +asset pageC.bundle.js 8.85 KiB [emitted] (name: pageC) +asset 531.chunk.js 6.28 KiB [emitted] +asset 78.chunk.js 605 bytes [emitted] +chunk (runtime: pageC) 78.chunk.js 42 bytes [rendered] > ./a ./pageC.js 1:0-3:2 ./a.js 21 bytes [built] [code generated] [used exports unknown] @@ -89,13 +77,19 @@ chunk (runtime: pageC) 394.chunk.js 42 bytes [rendered] cjs self exports reference ./b.js 1:0-14 cjs require ./b ./pageB.js 2:8-22 cjs require ./b ./pageC.js 2:17-31 -chunk (runtime: pageA) pageA.bundle.js (pageA) 69 bytes (javascript) 4.97 KiB (runtime) [entry] [rendered] +chunk (runtime: pageB) pageB.bundle.js (pageB) 69 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered] + > ./pageB pageB + runtime modules 4.94 KiB 6 modules + ./pageB.js 69 bytes [built] [code generated] + [used exports unknown] + entry ./pageB pageB +chunk (runtime: pageA) pageA.bundle.js (pageA) 69 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered] > ./pageA pageA - runtime modules 4.97 KiB 6 modules + runtime modules 4.94 KiB 6 modules ./pageA.js 69 bytes [built] [code generated] [used exports unknown] entry ./pageA pageA -chunk (runtime: pageA, pageB) 456.chunk.js 5.45 KiB [rendered] +chunk (runtime: pageA, pageB) 531.chunk.js 5.45 KiB [rendered] > ./common ./pageA.js 1:0-3:2 > ./common ./pageB.js 1:0-3:2 ./a.js 21 bytes [built] [code generated] @@ -113,7 +107,13 @@ chunk (runtime: pageA, pageB) 456.chunk.js 5.45 KiB [rendered] cjs self exports reference ./common.js 1:0-14 amd require ./common ./pageA.js 1:0-3:2 amd require ./common ./pageB.js 1:0-3:2 -webpack 5.78.0 compiled successfully +chunk (runtime: pageC) pageC.bundle.js (pageC) 68 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered] + > ./pageC pageC + runtime modules 4.94 KiB 6 modules + ./pageC.js 68 bytes [built] [code generated] + [used exports unknown] + entry ./pageC pageC +webpack 5.99.0 compiled successfully ``` ## Production mode @@ -122,21 +122,9 @@ webpack 5.78.0 compiled successfully asset pageC.bundle.js 1.74 KiB [emitted] [minimized] (name: pageC) asset pageA.bundle.js 1.73 KiB [emitted] [minimized] (name: pageA) asset pageB.bundle.js 1.73 KiB [emitted] [minimized] (name: pageB) -asset 456.chunk.js 155 bytes [emitted] [minimized] -asset 394.chunk.js 104 bytes [emitted] [minimized] -chunk (runtime: pageB) pageB.bundle.js (pageB) 69 bytes (javascript) 4.97 KiB (runtime) [entry] [rendered] - > ./pageB pageB - runtime modules 4.97 KiB 6 modules - ./pageB.js 69 bytes [built] [code generated] - [no exports used] - entry ./pageB pageB -chunk (runtime: pageC) pageC.bundle.js (pageC) 68 bytes (javascript) 4.97 KiB (runtime) [entry] [rendered] - > ./pageC pageC - runtime modules 4.97 KiB 6 modules - ./pageC.js 68 bytes [built] [code generated] - [no exports used] - entry ./pageC pageC -chunk (runtime: pageC) 394.chunk.js 42 bytes [rendered] +asset 531.chunk.js 154 bytes [emitted] [minimized] +asset 78.chunk.js 103 bytes [emitted] [minimized] +chunk (runtime: pageC) 78.chunk.js 42 bytes [rendered] > ./a ./pageC.js 1:0-3:2 ./a.js 21 bytes [built] [code generated] [used exports unknown] @@ -148,13 +136,19 @@ chunk (runtime: pageC) 394.chunk.js 42 bytes [rendered] cjs self exports reference ./b.js 1:0-14 cjs require ./b ./pageB.js 2:8-22 cjs require ./b ./pageC.js 2:17-31 -chunk (runtime: pageA) pageA.bundle.js (pageA) 69 bytes (javascript) 4.97 KiB (runtime) [entry] [rendered] +chunk (runtime: pageB) pageB.bundle.js (pageB) 69 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered] + > ./pageB pageB + runtime modules 4.94 KiB 6 modules + ./pageB.js 69 bytes [built] [code generated] + [no exports used] + entry ./pageB pageB +chunk (runtime: pageA) pageA.bundle.js (pageA) 69 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered] > ./pageA pageA - runtime modules 4.97 KiB 6 modules + runtime modules 4.94 KiB 6 modules ./pageA.js 69 bytes [built] [code generated] [no exports used] entry ./pageA pageA -chunk (runtime: pageA, pageB) 456.chunk.js 5.45 KiB [rendered] +chunk (runtime: pageA, pageB) 531.chunk.js 5.45 KiB [rendered] > ./common ./pageA.js 1:0-3:2 > ./common ./pageB.js 1:0-3:2 ./a.js 21 bytes [built] [code generated] @@ -172,5 +166,11 @@ chunk (runtime: pageA, pageB) 456.chunk.js 5.45 KiB [rendered] cjs self exports reference ./common.js 1:0-14 amd require ./common ./pageA.js 1:0-3:2 amd require ./common ./pageB.js 1:0-3:2 -webpack 5.78.0 compiled successfully +chunk (runtime: pageC) pageC.bundle.js (pageC) 68 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered] + > ./pageC pageC + runtime modules 4.94 KiB 6 modules + ./pageC.js 68 bytes [built] [code generated] + [no exports used] + entry ./pageC pageC +webpack 5.99.6 compiled successfully ``` diff --git a/examples/asset-advanced/README.md b/examples/asset-advanced/README.md index 9cea08ce8..d6d766469 100644 --- a/examples/asset-advanced/README.md +++ b/examples/asset-advanced/README.md @@ -196,5 +196,5 @@ chunk (runtime: main) output.js (main) 1.54 KiB (javascript) 274 bytes (runtime) [no exports] [used exports unknown] entry ./example.js main -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` diff --git a/examples/asset-simple/README.md b/examples/asset-simple/README.md index 5fc1813ee..9bc1be46f 100644 --- a/examples/asset-simple/README.md +++ b/examples/asset-simple/README.md @@ -217,5 +217,5 @@ chunk (runtime: main) output.js (main) 9.58 KiB (javascript) 14.6 KiB (asset) 30 [no exports] [used exports unknown] entry ./example.js main -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` diff --git a/examples/build-http/README.md b/examples/build-http/README.md index 088ca7e5a..bc2a62a37 100644 --- a/examples/build-http/README.md +++ b/examples/build-http/README.md @@ -35,7 +35,7 @@ module.exports = { ## Unoptimized ``` -asset output.js 82.6 KiB [emitted] (name: main) +asset output.js 82.4 KiB [emitted] (name: main) runtime modules 670 bytes 3 modules modules by path https:// 30 KiB modules by path https://jspm.dev/ 16.1 KiB 12 modules @@ -59,7 +59,7 @@ modules by path https:// 30 KiB [used exports unknown] harmony side effect evaluation https://cdn.skypack.dev/p-map ./example.js 1:0-50 harmony import specifier https://cdn.skypack.dev/p-map ./example.js 5:12-17 - https://cdn.skypack.dev/-/p-map@v5.1.0-7ixXvZxXPKKt9unR9LT0/dist=es2020,mode=imports/optimized/p-map.js 2.29 KiB [built] [code generated] + https://cdn.skypack.dev/-/p-map@v5.1.0-7ixXvZxXPKKt9unR9LT0/dist=es2020,mode=imp...(truncated) 2.29 KiB [built] [code generated] [exports: default, pMapSkip] [used exports unknown] harmony side effect evaluation /-/p-map@v5.1.0-7ixXvZxXPKKt9unR9LT0/dist=es2020,mode=imports/optimized/p-map.js https://cdn.skypack.dev/p-map 15:0-97 @@ -76,7 +76,7 @@ modules by path https:// 30 KiB [no exports] [used exports unknown] entry ./example.js main -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` ## Production mode @@ -88,5 +88,5 @@ orphan modules 30 KiB [orphan] 26 modules [no exports] [no exports used] entry ./example.js main -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` diff --git a/examples/chunkhash/README.md b/examples/chunkhash/README.md index fee9f799d..5f7c5dbe4 100644 --- a/examples/chunkhash/README.md +++ b/examples/chunkhash/README.md @@ -18,7 +18,8 @@ import("./async2"); # webpack.config.js ```javascript -var path = require("path"); +const path = require("path"); + module.exports = { // mode: "development" || "production", entry: { @@ -43,7 +44,7 @@ module.exports = { @@ -217,6 +218,7 @@ module.exports = { /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } /******/ +/******/ /******/ script.src = url; /******/ } /******/ inProgress[url] = [done]; @@ -409,23 +411,26 @@ chunk (runtime: runtime~main) 3.[chunkhash].js 28 bytes [rendered] ./async2.js 28 bytes [built] [code generated] [used exports unknown] import() ./async2 ./example.js 3:0-18 -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` ## Production mode ``` asset runtime~main.[chunkhash].js 2.73 KiB [emitted] [minimized] (name: runtime~main) -asset main.[chunkhash].js 157 bytes [emitted] [minimized] (name: main) -asset 114.[chunkhash].js 69 bytes [emitted] [minimized] -asset 172.[chunkhash].js 69 bytes [emitted] [minimized] -Entrypoint main 2.88 KiB = runtime~main.[chunkhash].js 2.73 KiB main.[chunkhash].js 157 bytes -chunk (runtime: runtime~main) 114.[chunkhash].js 28 bytes [rendered] +asset main.[chunkhash].js 155 bytes [emitted] [minimized] (name: main) +asset 471.[chunkhash].js 69 bytes [emitted] [minimized] +asset 18.[chunkhash].js 67 bytes [emitted] [minimized] +Entrypoint main 2.88 KiB = runtime~main.[chunkhash].js 2.73 KiB main.[chunkhash].js 155 bytes +chunk (runtime: runtime~main) 18.[chunkhash].js 28 bytes [rendered] > ./async1 ./example.js 2:0-18 ./async1.js 28 bytes [built] [code generated] [used exports unknown] import() ./async1 ./example.js 2:0-18 -chunk (runtime: runtime~main) 172.[chunkhash].js 28 bytes [rendered] +chunk (runtime: runtime~main) runtime~main.[chunkhash].js (runtime~main) 7.6 KiB [entry] [rendered] + > ./example main + runtime modules 7.6 KiB 10 modules +chunk (runtime: runtime~main) 471.[chunkhash].js 28 bytes [rendered] > ./async2 ./example.js 3:0-18 ./async2.js 28 bytes [built] [code generated] [used exports unknown] @@ -435,8 +440,5 @@ chunk (runtime: runtime~main) main.[chunkhash].js (main) 55 bytes [initial] [ren ./example.js 55 bytes [built] [code generated] [no exports used] entry ./example main -chunk (runtime: runtime~main) runtime~main.[chunkhash].js (runtime~main) 7.59 KiB [entry] [rendered] - > ./example main - runtime modules 7.59 KiB 10 modules -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` diff --git a/examples/cjs-tree-shaking/README.md b/examples/cjs-tree-shaking/README.md index 36bf5ac25..c58348c70 100644 --- a/examples/cjs-tree-shaking/README.md +++ b/examples/cjs-tree-shaking/README.md @@ -58,15 +58,15 @@ exports.multiply = function multiply() { !*** ./increment.js ***! \**********************/ /*! default exports */ -/*! export decrement [provided] [unused] [renamed to Mj] */ -/*! export increment [provided] [used in main] [renamed to nP] */ -/*! export incrementBy2 [provided] [unused] [renamed to pN] */ +/*! export decrement [provided] [unused] [renamed to Kt] */ +/*! export increment [provided] [used in main] [renamed to GV] */ +/*! export incrementBy2 [provided] [unused] [renamed to Bd] */ /*! runtime requirements: __webpack_require__, __webpack_exports__ */ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { var __webpack_unused_export__; -const add = (__webpack_require__(/*! ./math */ 2)/* .add */ .I); -exports.nP = function increment(val) { +const add = (__webpack_require__(/*! ./math */ 2)/* .add */ .W); +exports.GV = function increment(val) { return add(val, 1); }; __webpack_unused_export__ = function incrementBy2(val) { @@ -83,13 +83,13 @@ __webpack_unused_export__ = function decrement(val) { !*** ./math.js ***! \*****************/ /*! default exports */ -/*! export add [provided] [used in main] [renamed to I] */ -/*! export multiply [provided] [unused] [renamed to J] */ +/*! export add [provided] [used in main] [renamed to W] */ +/*! export multiply [provided] [unused] [renamed to l] */ /*! runtime requirements: __webpack_exports__ */ /***/ ((__unused_webpack_module, exports) => { var __webpack_unused_export__; -exports.I = function add() { +exports.W = function add() { var sum = 0, i = 0, args = arguments, @@ -158,7 +158,7 @@ var __webpack_exports__ = {}; \********************/ /*! unknown exports (runtime-defined) */ /*! runtime requirements: __webpack_require__ */ -const inc = (__webpack_require__(/*! ./increment */ 1)/* .increment */ .nP); +const inc = (__webpack_require__(/*! ./increment */ 1)/* .increment */ .GV); var a = 1; inc(a); // 2 @@ -172,7 +172,7 @@ inc(a); // 2 ```javascript /*! For license information please see output.js.LICENSE.txt */ -(()=>{var r=[,(r,n,t)=>{const o=t(2).I;n.nP=function(r){return o(r,1)}},(r,n)=>{n.I=function(){for(var r=0,n=0,t=arguments,o=t.length;n{var r=[,(r,t,n)=>{const o=n(2).W;t.GV=function(r){return o(r,1)}},(r,t)=>{t.W=function(){for(var r=0,t=0,n=arguments,o=n.length;t ./example.js main dependent modules 564 bytes [dependent] 2 modules ./example.js 70 bytes [built] [code generated] [used exports unknown] entry ./example.js main -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` ## Production mode @@ -216,7 +216,7 @@ chunk (runtime: main) output.js (main) 634 bytes [entry] [rendered] ./example.js 70 bytes [built] [code generated] [no exports used] entry ./example.js main -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully asset without.js 551 bytes [emitted] [minimized] (name: main) 1 related asset chunk (runtime: main) without.js (main) 634 bytes [entry] [rendered] @@ -225,5 +225,5 @@ chunk (runtime: main) without.js (main) 634 bytes [entry] [rendered] ./example.js 70 bytes [built] [code generated] [used exports unknown] entry ./example.js main -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` diff --git a/examples/code-splitted-require.context-amd/README.md b/examples/code-splitted-require.context-amd/README.md index abe1922c4..f74bb26ac 100644 --- a/examples/code-splitted-require.context-amd/README.md +++ b/examples/code-splitted-require.context-amd/README.md @@ -105,6 +105,7 @@ getTemplate("b", function(b) { /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } /******/ +/******/ /******/ script.src = url; /******/ } /******/ inProgress[url] = [done]; @@ -138,7 +139,7 @@ getTemplate("b", function(b) { /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded /******/ var installedChunks = { -/******/ 179: 0 +/******/ "main": 0 /******/ }; /******/ /******/ __webpack_require__.f.j = (chunkId, promises) => { @@ -175,7 +176,7 @@ getTemplate("b", function(b) { /******/ } /******/ }; /******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId); -/******/ } else installedChunks[chunkId] = 0; +/******/ } /******/ } /******/ } /******/ }; @@ -226,14 +227,13 @@ getTemplate("b", function(b) { ``` js -var __webpack_exports__ = {}; /*!********************!*\ !*** ./example.js ***! \********************/ /*! unknown exports (runtime-defined) */ /*! runtime requirements: __webpack_require__.e, __webpack_require__.oe, __webpack_require__, __webpack_require__.* */ function getTemplate(templateName, callback) { - __webpack_require__.e(/*! AMD require */ 577).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(1)("./"+templateName)]; (function(tmpl) { + __webpack_require__.e(/*! AMD require */ "require_context_templates_sync_recursive_").then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(1)("./"+templateName)]; (function(tmpl) { callback(tmpl()); }).apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__);})['catch'](__webpack_require__.oe); } @@ -247,10 +247,10 @@ getTemplate("b", function(b) { ; ``` -# dist/577.output.js +# dist/require_context_templates_sync_recursive_.output.js ``` javascript -(self["webpackChunk"] = self["webpackChunk"] || []).push([[577],[ +(self["webpackChunk"] = self["webpackChunk"] || []).push([["require_context_templates_sync_recursive_"],[ /* 0 */, /* 1 */ /*!***************************************************!*\ @@ -341,40 +341,40 @@ module.exports = function() { ## Unoptimized ``` -asset output.js 9.04 KiB [emitted] (name: main) -asset 577.output.js 2.23 KiB [emitted] -chunk (runtime: main) output.js (main) 251 bytes (javascript) 4.97 KiB (runtime) [entry] [rendered] +asset output.js 9.03 KiB [emitted] (name: main) +asset require_context_templates_sync_recursive_.output.js 2.27 KiB [emitted] +chunk (runtime: main) output.js (main) 251 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered] > ./example.js main - runtime modules 4.97 KiB 6 modules + runtime modules 4.94 KiB 6 modules ./example.js 251 bytes [built] [code generated] [used exports unknown] entry ./example.js main -chunk (runtime: main) 577.output.js 457 bytes [rendered] +chunk (runtime: main) require_context_templates_sync_recursive_.output.js 457 bytes [rendered] > ./example.js 2:1-4:3 dependent modules 240 bytes [dependent] 3 modules ../require.context/templates/ sync ^\.\/.*$ 217 bytes [built] [code generated] [no exports] [used exports unknown] amd require context ./example.js 2:1-4:3 -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` ## Production mode ``` -asset output.js 1.82 KiB [emitted] [minimized] (name: main) -asset 577.output.js 609 bytes [emitted] [minimized] -chunk (runtime: main) output.js (main) 251 bytes (javascript) 4.97 KiB (runtime) [entry] [rendered] +asset output.js 1.86 KiB [emitted] [minimized] (name: main) +asset require_context_templates_sync_recursive_.output.js 652 bytes [emitted] [minimized] +chunk (runtime: main) output.js (main) 251 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered] > ./example.js main - runtime modules 4.97 KiB 6 modules + runtime modules 4.94 KiB 6 modules ./example.js 251 bytes [built] [code generated] [no exports used] entry ./example.js main -chunk (runtime: main) 577.output.js 457 bytes [rendered] +chunk (runtime: main) require_context_templates_sync_recursive_.output.js 457 bytes [rendered] > ./example.js 2:1-4:3 dependent modules 240 bytes [dependent] 3 modules ../require.context/templates/ sync ^\.\/.*$ 217 bytes [built] [code generated] [no exports] amd require context ./example.js 2:1-4:3 -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` diff --git a/examples/code-splitted-require.context-amd/template.md b/examples/code-splitted-require.context-amd/template.md index 515bc9e62..5c134294f 100644 --- a/examples/code-splitted-require.context-amd/template.md +++ b/examples/code-splitted-require.context-amd/template.md @@ -10,10 +10,10 @@ _{{example.js}}_ _{{dist/output.js}}_ ``` -# dist/577.output.js +# dist/require_context_templates_sync_recursive_.output.js ``` javascript -_{{dist/577.output.js}}_ +_{{dist/require_context_templates_sync_recursive_.output.js}}_ ``` # Info diff --git a/examples/code-splitted-require.context-amd/webpack.config.js b/examples/code-splitted-require.context-amd/webpack.config.js index 2ad01d570..115df1748 100644 --- a/examples/code-splitted-require.context-amd/webpack.config.js +++ b/examples/code-splitted-require.context-amd/webpack.config.js @@ -1,5 +1,5 @@ module.exports = { optimization: { - chunkIds: "deterministic" // To keep filename consistent between different modes (for example building only) + chunkIds: "named" // To keep filename consistent between different modes (for example building only) } }; diff --git a/examples/code-splitted-require.context/README.md b/examples/code-splitted-require.context/README.md index 89fe83e21..727a3b2d0 100644 --- a/examples/code-splitted-require.context/README.md +++ b/examples/code-splitted-require.context/README.md @@ -105,6 +105,7 @@ getTemplate("b", function(b) { /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } /******/ +/******/ /******/ script.src = url; /******/ } /******/ inProgress[url] = [done]; @@ -138,7 +139,7 @@ getTemplate("b", function(b) { /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded /******/ var installedChunks = { -/******/ 179: 0 +/******/ "main": 0 /******/ }; /******/ /******/ __webpack_require__.f.j = (chunkId, promises) => { @@ -175,7 +176,7 @@ getTemplate("b", function(b) { /******/ } /******/ }; /******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId); -/******/ } else installedChunks[chunkId] = 0; +/******/ } /******/ } /******/ } /******/ }; @@ -226,14 +227,13 @@ getTemplate("b", function(b) { ``` js -var __webpack_exports__ = {}; /*!********************!*\ !*** ./example.js ***! \********************/ /*! unknown exports (runtime-defined) */ /*! runtime requirements: __webpack_require__.e, __webpack_require__, __webpack_require__.* */ function getTemplate(templateName, callback) { - __webpack_require__.e(/*! require.ensure */ 577).then((function(require) { + __webpack_require__.e(/*! require.ensure */ "require_context_templates_sync_recursive_").then((function(require) { callback(__webpack_require__(1)("./"+templateName)()); }).bind(null, __webpack_require__))['catch'](__webpack_require__.oe); } @@ -247,10 +247,10 @@ getTemplate("b", function(b) { ; ``` -# dist/577.output.js +# dist/require_context_templates_sync_recursive_.output.js ``` javascript -(self["webpackChunk"] = self["webpackChunk"] || []).push([[577],[ +(self["webpackChunk"] = self["webpackChunk"] || []).push([["require_context_templates_sync_recursive_"],[ /* 0 */, /* 1 */ /*!***************************************************!*\ @@ -341,40 +341,40 @@ module.exports = function() { ## Unoptimized ``` -asset output.js 8.95 KiB [emitted] (name: main) -asset 577.output.js 2.23 KiB [emitted] -chunk (runtime: main) output.js (main) 266 bytes (javascript) 4.97 KiB (runtime) [entry] [rendered] +asset output.js 8.94 KiB [emitted] (name: main) +asset require_context_templates_sync_recursive_.output.js 2.27 KiB [emitted] +chunk (runtime: main) output.js (main) 266 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered] > ./example.js main - runtime modules 4.97 KiB 6 modules + runtime modules 4.94 KiB 6 modules ./example.js 266 bytes [built] [code generated] [used exports unknown] entry ./example.js main -chunk (runtime: main) 577.output.js 457 bytes [rendered] +chunk (runtime: main) require_context_templates_sync_recursive_.output.js 457 bytes [rendered] > ./example.js 2:1-4:3 dependent modules 240 bytes [dependent] 3 modules ../require.context/templates/ sync ^\.\/.*$ 217 bytes [built] [code generated] [no exports] [used exports unknown] cjs require context ./example.js 3:11-64 -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` ## Production mode ``` -asset output.js 1.79 KiB [emitted] [minimized] (name: main) -asset 577.output.js 609 bytes [emitted] [minimized] -chunk (runtime: main) output.js (main) 266 bytes (javascript) 4.97 KiB (runtime) [entry] [rendered] +asset output.js 1.83 KiB [emitted] [minimized] (name: main) +asset require_context_templates_sync_recursive_.output.js 652 bytes [emitted] [minimized] +chunk (runtime: main) output.js (main) 266 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered] > ./example.js main - runtime modules 4.97 KiB 6 modules + runtime modules 4.94 KiB 6 modules ./example.js 266 bytes [built] [code generated] [no exports used] entry ./example.js main -chunk (runtime: main) 577.output.js 457 bytes [rendered] +chunk (runtime: main) require_context_templates_sync_recursive_.output.js 457 bytes [rendered] > ./example.js 2:1-4:3 dependent modules 240 bytes [dependent] 3 modules ../require.context/templates/ sync ^\.\/.*$ 217 bytes [built] [code generated] [no exports] cjs require context ./example.js 3:11-64 -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` diff --git a/examples/code-splitted-require.context/template.md b/examples/code-splitted-require.context/template.md index 515bc9e62..5c134294f 100644 --- a/examples/code-splitted-require.context/template.md +++ b/examples/code-splitted-require.context/template.md @@ -10,10 +10,10 @@ _{{example.js}}_ _{{dist/output.js}}_ ``` -# dist/577.output.js +# dist/require_context_templates_sync_recursive_.output.js ``` javascript -_{{dist/577.output.js}}_ +_{{dist/require_context_templates_sync_recursive_.output.js}}_ ``` # Info diff --git a/examples/code-splitted-require.context/webpack.config.js b/examples/code-splitted-require.context/webpack.config.js index 2ad01d570..115df1748 100644 --- a/examples/code-splitted-require.context/webpack.config.js +++ b/examples/code-splitted-require.context/webpack.config.js @@ -1,5 +1,5 @@ module.exports = { optimization: { - chunkIds: "deterministic" // To keep filename consistent between different modes (for example building only) + chunkIds: "named" // To keep filename consistent between different modes (for example building only) } }; diff --git a/examples/code-splitting-bundle-loader/README.md b/examples/code-splitting-bundle-loader/README.md index 8e869fb9b..a0525b108 100644 --- a/examples/code-splitting-bundle-loader/README.md +++ b/examples/code-splitting-bundle-loader/README.md @@ -37,7 +37,7 @@ module.exports = function(cb) { if(cbs) cbs.push(cb); else cb(data); } -__webpack_require__.e(/*! require.ensure */ 929).then((function(require) { +__webpack_require__.e(/*! require.ensure */ "file_js").then((function(require) { data = __webpack_require__(/*! !!./file.js */ 2); var callbacks = cbs; cbs = null; @@ -134,6 +134,7 @@ __webpack_require__.e(/*! require.ensure */ 929).then((function(require) { /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } /******/ +/******/ /******/ script.src = url; /******/ } /******/ inProgress[url] = [done]; @@ -167,7 +168,7 @@ __webpack_require__.e(/*! require.ensure */ 929).then((function(require) { /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded /******/ var installedChunks = { -/******/ 179: 0 +/******/ "main": 0 /******/ }; /******/ /******/ __webpack_require__.f.j = (chunkId, promises) => { @@ -204,7 +205,7 @@ __webpack_require__.e(/*! require.ensure */ 929).then((function(require) { /******/ } /******/ }; /******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId); -/******/ } else installedChunks[chunkId] = 0; +/******/ } /******/ } /******/ } /******/ }; @@ -255,7 +256,6 @@ __webpack_require__.e(/*! require.ensure */ 929).then((function(require) { ``` js -var __webpack_exports__ = {}; // This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. (() => { /*!********************!*\ @@ -273,10 +273,10 @@ __webpack_require__(/*! bundle-loader!./file.js */ 1)(function(fileJsExports) { ; ``` -# dist/929.output.js +# dist/file_js.output.js ```javascript -(self["webpackChunk"] = self["webpackChunk"] || []).push([[929],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([["file_js"],{ /***/ 2: /*!*****************!*\ @@ -299,41 +299,41 @@ module.exports = "It works"; ## Unoptimized ``` -asset output.js 9.68 KiB [emitted] (name: main) -asset 929.output.js 354 bytes [emitted] -chunk (runtime: main) output.js (main) 375 bytes (javascript) 4.97 KiB (runtime) [entry] [rendered] - > ./example.js main - runtime modules 4.97 KiB 6 modules - dependent modules 281 bytes [dependent] 1 module - ./example.js 94 bytes [built] [code generated] - [used exports unknown] - entry ./example.js main -chunk (runtime: main) 929.output.js 28 bytes [rendered] +asset output.js 9.64 KiB [emitted] (name: main) +asset file_js.output.js 360 bytes [emitted] +chunk (runtime: main) file_js.output.js 28 bytes [rendered] > ../../node_modules/bundle-loader/index.js!./file.js 7:0-14:2 ./file.js 28 bytes [built] [code generated] [used exports unknown] cjs self exports reference ./file.js 1:0-14 cjs require !!./file.js ../../node_modules/bundle-loader/index.js!./file.js 8:8-30 -webpack 5.78.0 compiled successfully +chunk (runtime: main) output.js (main) 375 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered] + > ./example.js main + runtime modules 4.94 KiB 6 modules + dependent modules 281 bytes [dependent] 1 module + ./example.js 94 bytes [built] [code generated] + [used exports unknown] + entry ./example.js main +webpack 5.99.6 compiled successfully ``` ## Production mode ``` -asset output.js 1.85 KiB [emitted] [minimized] (name: main) -asset 929.output.js 88 bytes [emitted] [minimized] -chunk (runtime: main) output.js (main) 375 bytes (javascript) 4.97 KiB (runtime) [entry] [rendered] - > ./example.js main - runtime modules 4.97 KiB 6 modules - dependent modules 281 bytes [dependent] 1 module - ./example.js 94 bytes [built] [code generated] - [no exports used] - entry ./example.js main -chunk (runtime: main) 929.output.js 28 bytes [rendered] +asset output.js 1.86 KiB [emitted] [minimized] (name: main) +asset file_js.output.js 94 bytes [emitted] [minimized] +chunk (runtime: main) file_js.output.js 28 bytes [rendered] > ../../node_modules/bundle-loader/index.js!./file.js 7:0-14:2 ./file.js 28 bytes [built] [code generated] [used exports unknown] cjs self exports reference ./file.js 1:0-14 cjs require !!./file.js ../../node_modules/bundle-loader/index.js!./file.js 8:8-30 -webpack 5.78.0 compiled successfully +chunk (runtime: main) output.js (main) 375 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered] + > ./example.js main + runtime modules 4.94 KiB 6 modules + dependent modules 281 bytes [dependent] 1 module + ./example.js 94 bytes [built] [code generated] + [no exports used] + entry ./example.js main +webpack 5.99.6 compiled successfully ``` diff --git a/examples/code-splitting-bundle-loader/template.md b/examples/code-splitting-bundle-loader/template.md index c0bab13af..38e642808 100644 --- a/examples/code-splitting-bundle-loader/template.md +++ b/examples/code-splitting-bundle-loader/template.md @@ -20,10 +20,10 @@ _{{file.js}}_ _{{dist/output.js}}_ ``` -# dist/929.output.js +# dist/file_js.output.js ```javascript -_{{dist/929.output.js}}_ +_{{dist/file_js.output.js}}_ ``` # Info diff --git a/examples/code-splitting-bundle-loader/webpack.config.js b/examples/code-splitting-bundle-loader/webpack.config.js index 2ad01d570..115df1748 100644 --- a/examples/code-splitting-bundle-loader/webpack.config.js +++ b/examples/code-splitting-bundle-loader/webpack.config.js @@ -1,5 +1,5 @@ module.exports = { optimization: { - chunkIds: "deterministic" // To keep filename consistent between different modes (for example building only) + chunkIds: "named" // To keep filename consistent between different modes (for example building only) } }; diff --git a/examples/code-splitting-depend-on-advanced/README.md b/examples/code-splitting-depend-on-advanced/README.md index 09b2c0df6..6f0e881a1 100644 --- a/examples/code-splitting-depend-on-advanced/README.md +++ b/examples/code-splitting-depend-on-advanced/README.md @@ -209,6 +209,7 @@ console.log(lodash, isomorphicFetch); /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } /******/ +/******/ /******/ script.src = url; /******/ } /******/ inProgress[url] = [done]; @@ -554,7 +555,7 @@ asset react-vendors.js 1.33 KiB [emitted] (name: react-vendors) asset lazy_js.js 1.11 KiB [emitted] Entrypoint app 1.44 KiB = app.js Entrypoint page1 1.91 KiB = page1.js -Entrypoint react-vendors 12.4 KiB = runtime.js 11.1 KiB react-vendors.js 1.33 KiB +Entrypoint react-vendors 12.5 KiB = runtime.js 11.1 KiB react-vendors.js 1.33 KiB Entrypoint other-vendors 13.3 KiB = runtime.js 11.1 KiB other-vendors.js 2.13 KiB chunk (runtime: runtime) app.js (app) 116 bytes <{other-vendors}> <{runtime}> >{page1}< [initial] [rendered] > ./app.js app @@ -612,22 +613,22 @@ chunk (runtime: runtime) runtime.js (runtime) 6.74 KiB ={other-vendors}= ={react > react react-vendors > react-dom react-vendors runtime modules 6.74 KiB 10 modules -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` ## Production mode ``` asset runtime.js 2.37 KiB [emitted] [minimized] (name: runtime) -asset page1.js 287 bytes [emitted] [minimized] (name: page1) -asset other-vendors.js 239 bytes [emitted] [minimized] (name: other-vendors) -asset app.js 207 bytes [emitted] [minimized] (name: app) -asset react-vendors.js 200 bytes [emitted] [minimized] (name: react-vendors) -asset lazy_js.js 159 bytes [emitted] [minimized] -Entrypoint app 207 bytes = app.js -Entrypoint page1 287 bytes = page1.js -Entrypoint react-vendors 2.56 KiB = runtime.js 2.37 KiB react-vendors.js 200 bytes -Entrypoint other-vendors 2.6 KiB = runtime.js 2.37 KiB other-vendors.js 239 bytes +asset page1.js 283 bytes [emitted] [minimized] (name: page1) +asset other-vendors.js 241 bytes [emitted] [minimized] (name: other-vendors) +asset react-vendors.js 204 bytes [emitted] [minimized] (name: react-vendors) +asset app.js 202 bytes [emitted] [minimized] (name: app) +asset lazy_js.js 160 bytes [emitted] [minimized] +Entrypoint app 202 bytes = app.js +Entrypoint page1 283 bytes = page1.js +Entrypoint react-vendors 2.57 KiB = runtime.js 2.37 KiB react-vendors.js 204 bytes +Entrypoint other-vendors 2.6 KiB = runtime.js 2.37 KiB other-vendors.js 241 bytes chunk (runtime: runtime) app.js (app) 116 bytes <{other-vendors}> <{runtime}> >{page1}< [initial] [rendered] > ./app.js app ./app.js 116 bytes [built] [code generated] @@ -683,5 +684,5 @@ chunk (runtime: runtime) runtime.js (runtime) 6.74 KiB ={other-vendors}= ={react > react react-vendors > react-dom react-vendors runtime modules 6.74 KiB 10 modules -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` diff --git a/examples/code-splitting-depend-on-simple/README.md b/examples/code-splitting-depend-on-simple/README.md index df67b1bbc..5f1b88dbb 100644 --- a/examples/code-splitting-depend-on-simple/README.md +++ b/examples/code-splitting-depend-on-simple/README.md @@ -330,14 +330,14 @@ chunk (runtime: react-vendors) react-vendors.js (react-vendors) 87 bytes (javasc harmony import specifier react ./app.js 5:12-17 cjs self exports reference ./node_modules/react.js 1:0-14 entry react react-vendors -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` ## Production mode ``` asset react-vendors.js 1.15 KiB [emitted] [minimized] (name: react-vendors) -asset app.js 185 bytes [emitted] [minimized] (name: app) +asset app.js 187 bytes [emitted] [minimized] (name: app) chunk (runtime: react-vendors) app.js (app) 139 bytes <{react-vendors}> [initial] [rendered] > ./app.js app ./app.js 139 bytes [built] [code generated] @@ -371,5 +371,5 @@ chunk (runtime: react-vendors) react-vendors.js (react-vendors) 87 bytes (javasc harmony import specifier react ./app.js 5:12-17 cjs self exports reference ./node_modules/react.js 1:0-14 entry react react-vendors -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` diff --git a/examples/code-splitting-harmony/README.md b/examples/code-splitting-harmony/README.md index f8ad6ef9d..2528acd6b 100644 --- a/examples/code-splitting-harmony/README.md +++ b/examples/code-splitting-harmony/README.md @@ -53,19 +53,19 @@ Promise.all([loadC("1"), loadC("2")]).then(function(arr) { var map = { "./1": [ 4, - 346 + 197 ], "./1.js": [ 4, - 346 + 197 ], "./2": [ 5, - 98 + 140 ], "./2.js": [ 5, - 98 + 140 ] }; function webpackAsyncContext(req) { @@ -228,6 +228,7 @@ module.exports = webpackAsyncContext; /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } /******/ +/******/ /******/ script.src = url; /******/ } /******/ inProgress[url] = [done]; @@ -272,7 +273,7 @@ module.exports = webpackAsyncContext; /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded /******/ var installedChunks = { -/******/ 179: 0 +/******/ 792: 0 /******/ }; /******/ /******/ __webpack_require__.f.j = (chunkId, promises) => { @@ -309,7 +310,7 @@ module.exports = webpackAsyncContext; /******/ } /******/ }; /******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId); -/******/ } else installedChunks[chunkId] = 0; +/******/ } /******/ } /******/ } /******/ }; @@ -375,7 +376,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var a__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(a__WEBPACK_IMPORTED_MODULE_0__); -__webpack_require__.e(/*! import() */ 644).then(__webpack_require__.t.bind(__webpack_require__, /*! b */ 3, 23)).then(function(b) { +__webpack_require__.e(/*! import() */ 414).then(__webpack_require__.t.bind(__webpack_require__, /*! b */ 3, 23)).then(function(b) { console.log("b loaded", b); }) @@ -399,72 +400,72 @@ Promise.all([loadC("1"), loadC("2")]).then(function(arr) { ``` asset output.js 13.6 KiB [emitted] (name: main) -asset 346.output.js 296 bytes [emitted] -asset 98.output.js 295 bytes [emitted] -asset 644.output.js 288 bytes [emitted] -chunk (runtime: main) 98.output.js 13 bytes [rendered] +asset 140.output.js 296 bytes [emitted] +asset 197.output.js 296 bytes [emitted] +asset 414.output.js 288 bytes [emitted] +chunk (runtime: main) 140.output.js 13 bytes [rendered] > ./2 ./node_modules/c/ lazy ^\.\/.*$ namespace object ./2 > ./2.js ./node_modules/c/ lazy ^\.\/.*$ namespace object ./2.js ./node_modules/c/2.js 13 bytes [optional] [built] [code generated] [used exports unknown] import() context element ./2 ./node_modules/c/ lazy ^\.\/.*$ namespace object ./2 import() context element ./2.js ./node_modules/c/ lazy ^\.\/.*$ namespace object ./2.js -chunk (runtime: main) output.js (main) 414 bytes (javascript) 6.91 KiB (runtime) [entry] [rendered] +chunk (runtime: main) 197.output.js 13 bytes [rendered] + > ./1 ./node_modules/c/ lazy ^\.\/.*$ namespace object ./1 + > ./1.js ./node_modules/c/ lazy ^\.\/.*$ namespace object ./1.js + ./node_modules/c/1.js 13 bytes [optional] [built] [code generated] + [used exports unknown] + import() context element ./1 ./node_modules/c/ lazy ^\.\/.*$ namespace object ./1 + import() context element ./1.js ./node_modules/c/ lazy ^\.\/.*$ namespace object ./1.js +chunk (runtime: main) 414.output.js 11 bytes [rendered] + > b ./example.js 3:0-11 + ./node_modules/b.js 11 bytes [built] [code generated] + [used exports unknown] + import() b ./example.js 3:0-11 +chunk (runtime: main) output.js (main) 414 bytes (javascript) 6.88 KiB (runtime) [entry] [rendered] > ./example.js main - runtime modules 6.91 KiB 10 modules + runtime modules 6.88 KiB 10 modules dependent modules 171 bytes [dependent] 2 modules ./example.js 243 bytes [built] [code generated] [no exports] [used exports unknown] entry ./example.js main -chunk (runtime: main) 346.output.js 13 bytes [rendered] - > ./1 ./node_modules/c/ lazy ^\.\/.*$ namespace object ./1 - > ./1.js ./node_modules/c/ lazy ^\.\/.*$ namespace object ./1.js - ./node_modules/c/1.js 13 bytes [optional] [built] [code generated] - [used exports unknown] - import() context element ./1 ./node_modules/c/ lazy ^\.\/.*$ namespace object ./1 - import() context element ./1.js ./node_modules/c/ lazy ^\.\/.*$ namespace object ./1.js -chunk (runtime: main) 644.output.js 11 bytes [rendered] - > b ./example.js 3:0-11 - ./node_modules/b.js 11 bytes [built] [code generated] - [used exports unknown] - import() b ./example.js 3:0-11 -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` ## Production mode ``` -asset output.js 2.88 KiB [emitted] [minimized] (name: main) -asset 346.output.js 69 bytes [emitted] [minimized] -asset 644.output.js 69 bytes [emitted] [minimized] -asset 98.output.js 67 bytes [emitted] [minimized] -chunk (runtime: main) 98.output.js 13 bytes [rendered] +asset output.js 2.89 KiB [emitted] [minimized] (name: main) +asset 140.output.js 69 bytes [emitted] [minimized] +asset 197.output.js 69 bytes [emitted] [minimized] +asset 414.output.js 69 bytes [emitted] [minimized] +chunk (runtime: main) 140.output.js 13 bytes [rendered] > ./2 ./node_modules/c/ lazy ^\.\/.*$ namespace object ./2 > ./2.js ./node_modules/c/ lazy ^\.\/.*$ namespace object ./2.js ./node_modules/c/2.js 13 bytes [optional] [built] [code generated] [used exports unknown] import() context element ./2 ./node_modules/c/ lazy ^\.\/.*$ namespace object ./2 import() context element ./2.js ./node_modules/c/ lazy ^\.\/.*$ namespace object ./2.js -chunk (runtime: main) output.js (main) 403 bytes (javascript) 6.65 KiB (runtime) [entry] [rendered] - > ./example.js main - runtime modules 6.65 KiB 9 modules - dependent modules 160 bytes [dependent] 1 module - ./example.js 243 bytes [built] [code generated] - [no exports] - [no exports used] - entry ./example.js main -chunk (runtime: main) 346.output.js 13 bytes [rendered] +chunk (runtime: main) 197.output.js 13 bytes [rendered] > ./1 ./node_modules/c/ lazy ^\.\/.*$ namespace object ./1 > ./1.js ./node_modules/c/ lazy ^\.\/.*$ namespace object ./1.js ./node_modules/c/1.js 13 bytes [optional] [built] [code generated] [used exports unknown] import() context element ./1 ./node_modules/c/ lazy ^\.\/.*$ namespace object ./1 import() context element ./1.js ./node_modules/c/ lazy ^\.\/.*$ namespace object ./1.js -chunk (runtime: main) 644.output.js 11 bytes [rendered] +chunk (runtime: main) 414.output.js 11 bytes [rendered] > b ./example.js 3:0-11 ./node_modules/b.js 11 bytes [built] [code generated] [used exports unknown] import() b ./example.js 3:0-11 -webpack 5.78.0 compiled successfully +chunk (runtime: main) output.js (main) 403 bytes (javascript) 6.62 KiB (runtime) [entry] [rendered] + > ./example.js main + runtime modules 6.62 KiB 9 modules + dependent modules 160 bytes [dependent] 1 module + ./example.js 243 bytes [built] [code generated] + [no exports] + [no exports used] + entry ./example.js main +webpack 5.99.6 compiled successfully ``` diff --git a/examples/code-splitting-native-import-context-filter/README.md b/examples/code-splitting-native-import-context-filter/README.md index bad6585f2..0484b34eb 100644 --- a/examples/code-splitting-native-import-context-filter/README.md +++ b/examples/code-splitting-native-import-context-filter/README.md @@ -61,27 +61,27 @@ export default foo; var map = { "./bar": [ 2, - 398 + 776 ], "./bar.js": [ 2, - 398 + 776 ], "./baz": [ 3, - 544 + 0 ], "./baz.js": [ 3, - 544 + 0 ], "./foo": [ 4, - 718 + 717 ], "./foo.js": [ 4, - 718 + 717 ] }; function webpackAsyncContext(req) { @@ -202,6 +202,7 @@ module.exports = webpackAsyncContext; /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } /******/ +/******/ /******/ script.src = url; /******/ } /******/ inProgress[url] = [done]; @@ -246,7 +247,7 @@ module.exports = webpackAsyncContext; /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded /******/ var installedChunks = { -/******/ 179: 0 +/******/ 792: 0 /******/ }; /******/ /******/ __webpack_require__.f.j = (chunkId, promises) => { @@ -283,7 +284,7 @@ module.exports = webpackAsyncContext; /******/ } /******/ }; /******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId); -/******/ } else installedChunks[chunkId] = 0; +/******/ } /******/ } /******/ } /******/ }; @@ -372,25 +373,10 @@ getTemplate("baz.noimport"); ``` asset output.js 11.2 KiB [emitted] (name: main) -asset 398.output.js 858 bytes [emitted] -asset 544.output.js 858 bytes [emitted] -asset 718.output.js 858 bytes [emitted] -chunk (runtime: main) output.js (main) 597 bytes (javascript) 5.54 KiB (runtime) [entry] [rendered] - > ./example.js main - runtime modules 5.54 KiB 8 modules - dependent modules 160 bytes [dependent] 1 module - ./example.js 437 bytes [built] [code generated] - [used exports unknown] - entry ./example.js main -chunk (runtime: main) 398.output.js 38 bytes [rendered] - > ./bar ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar - > ./bar.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar.js - ./templates/bar.js 38 bytes [optional] [built] [code generated] - [exports: default] - [used exports unknown] - import() context element ./bar ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar - import() context element ./bar.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar.js -chunk (runtime: main) 544.output.js 38 bytes [rendered] +asset 717.output.js 858 bytes [emitted] +asset 776.output.js 858 bytes [emitted] +asset 0.output.js 856 bytes [emitted] +chunk (runtime: main) 0.output.js 38 bytes [rendered] > ./baz ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz > ./baz.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz.js ./templates/baz.js 38 bytes [optional] [built] [code generated] @@ -398,7 +384,7 @@ chunk (runtime: main) 544.output.js 38 bytes [rendered] [used exports unknown] import() context element ./baz ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz import() context element ./baz.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz.js -chunk (runtime: main) 718.output.js 38 bytes [rendered] +chunk (runtime: main) 717.output.js 38 bytes [rendered] > ./foo ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo > ./foo.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo.js ./templates/foo.js 38 bytes [optional] [built] [code generated] @@ -406,43 +392,58 @@ chunk (runtime: main) 718.output.js 38 bytes [rendered] [used exports unknown] import() context element ./foo ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo import() context element ./foo.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo.js -webpack 5.78.0 compiled successfully +chunk (runtime: main) 776.output.js 38 bytes [rendered] + > ./bar ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar + > ./bar.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar.js + ./templates/bar.js 38 bytes [optional] [built] [code generated] + [exports: default] + [used exports unknown] + import() context element ./bar ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar + import() context element ./bar.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar.js +chunk (runtime: main) output.js (main) 597 bytes (javascript) 5.5 KiB (runtime) [entry] [rendered] + > ./example.js main + runtime modules 5.5 KiB 8 modules + dependent modules 160 bytes [dependent] 1 module + ./example.js 437 bytes [built] [code generated] + [used exports unknown] + entry ./example.js main +webpack 5.99.6 compiled successfully ``` ## Production mode ``` -asset output.js 2.47 KiB [emitted] [minimized] (name: main) -asset 398.output.js 130 bytes [emitted] [minimized] -asset 544.output.js 130 bytes [emitted] [minimized] -asset 718.output.js 130 bytes [emitted] [minimized] -chunk (runtime: main) output.js (main) 597 bytes (javascript) 5.54 KiB (runtime) [entry] [rendered] - > ./example.js main - runtime modules 5.54 KiB 8 modules - dependent modules 160 bytes [dependent] 1 module - ./example.js 437 bytes [built] [code generated] - [no exports used] - entry ./example.js main -chunk (runtime: main) 398.output.js 38 bytes [rendered] - > ./bar ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar - > ./bar.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar.js - ./templates/bar.js 38 bytes [optional] [built] [code generated] - [exports: default] - import() context element ./bar ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar - import() context element ./bar.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar.js -chunk (runtime: main) 544.output.js 38 bytes [rendered] +asset output.js 2.46 KiB [emitted] [minimized] (name: main) +asset 717.output.js 130 bytes [emitted] [minimized] +asset 776.output.js 130 bytes [emitted] [minimized] +asset 0.output.js 124 bytes [emitted] [minimized] +chunk (runtime: main) 0.output.js 38 bytes [rendered] > ./baz ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz > ./baz.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz.js ./templates/baz.js 38 bytes [optional] [built] [code generated] [exports: default] import() context element ./baz ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz import() context element ./baz.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz.js -chunk (runtime: main) 718.output.js 38 bytes [rendered] +chunk (runtime: main) 717.output.js 38 bytes [rendered] > ./foo ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo > ./foo.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo.js ./templates/foo.js 38 bytes [optional] [built] [code generated] [exports: default] import() context element ./foo ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo import() context element ./foo.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo.js -webpack 5.78.0 compiled successfully +chunk (runtime: main) 776.output.js 38 bytes [rendered] + > ./bar ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar + > ./bar.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar.js + ./templates/bar.js 38 bytes [optional] [built] [code generated] + [exports: default] + import() context element ./bar ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar + import() context element ./bar.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar.js +chunk (runtime: main) output.js (main) 597 bytes (javascript) 5.5 KiB (runtime) [entry] [rendered] + > ./example.js main + runtime modules 5.5 KiB 8 modules + dependent modules 160 bytes [dependent] 1 module + ./example.js 437 bytes [built] [code generated] + [no exports used] + entry ./example.js main +webpack 5.99.6 compiled successfully ``` diff --git a/examples/code-splitting-native-import-context/README.md b/examples/code-splitting-native-import-context/README.md index 67233cf69..95eaf0a1d 100644 --- a/examples/code-splitting-native-import-context/README.md +++ b/examples/code-splitting-native-import-context/README.md @@ -50,27 +50,27 @@ export default foo; var map = { "./bar": [ 2, - 398 + 776 ], "./bar.js": [ 2, - 398 + 776 ], "./baz": [ 3, - 544 + 0 ], "./baz.js": [ 3, - 544 + 0 ], "./foo": [ 4, - 718 + 717 ], "./foo.js": [ 4, - 718 + 717 ] }; function webpackAsyncContext(req) { @@ -191,6 +191,7 @@ module.exports = webpackAsyncContext; /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } /******/ +/******/ /******/ script.src = url; /******/ } /******/ inProgress[url] = [done]; @@ -235,7 +236,7 @@ module.exports = webpackAsyncContext; /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded /******/ var installedChunks = { -/******/ 179: 0 +/******/ 792: 0 /******/ }; /******/ /******/ __webpack_require__.f.j = (chunkId, promises) => { @@ -272,7 +273,7 @@ module.exports = webpackAsyncContext; /******/ } /******/ }; /******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId); -/******/ } else installedChunks[chunkId] = 0; +/******/ } /******/ } /******/ } /******/ }; @@ -359,25 +360,10 @@ getTemplate("baz"); ``` asset output.js 11 KiB [emitted] (name: main) -asset 398.output.js 858 bytes [emitted] -asset 544.output.js 858 bytes [emitted] -asset 718.output.js 858 bytes [emitted] -chunk (runtime: main) output.js (main) 441 bytes (javascript) 5.54 KiB (runtime) [entry] [rendered] - > ./example.js main - runtime modules 5.54 KiB 8 modules - dependent modules 160 bytes [dependent] 1 module - ./example.js 281 bytes [built] [code generated] - [used exports unknown] - entry ./example.js main -chunk (runtime: main) 398.output.js 38 bytes [rendered] - > ./bar ./templates/ lazy ^\.\/.*$ namespace object ./bar - > ./bar.js ./templates/ lazy ^\.\/.*$ namespace object ./bar.js - ./templates/bar.js 38 bytes [optional] [built] [code generated] - [exports: default] - [used exports unknown] - import() context element ./bar ./templates/ lazy ^\.\/.*$ namespace object ./bar - import() context element ./bar.js ./templates/ lazy ^\.\/.*$ namespace object ./bar.js -chunk (runtime: main) 544.output.js 38 bytes [rendered] +asset 717.output.js 858 bytes [emitted] +asset 776.output.js 858 bytes [emitted] +asset 0.output.js 856 bytes [emitted] +chunk (runtime: main) 0.output.js 38 bytes [rendered] > ./baz ./templates/ lazy ^\.\/.*$ namespace object ./baz > ./baz.js ./templates/ lazy ^\.\/.*$ namespace object ./baz.js ./templates/baz.js 38 bytes [optional] [built] [code generated] @@ -385,7 +371,7 @@ chunk (runtime: main) 544.output.js 38 bytes [rendered] [used exports unknown] import() context element ./baz ./templates/ lazy ^\.\/.*$ namespace object ./baz import() context element ./baz.js ./templates/ lazy ^\.\/.*$ namespace object ./baz.js -chunk (runtime: main) 718.output.js 38 bytes [rendered] +chunk (runtime: main) 717.output.js 38 bytes [rendered] > ./foo ./templates/ lazy ^\.\/.*$ namespace object ./foo > ./foo.js ./templates/ lazy ^\.\/.*$ namespace object ./foo.js ./templates/foo.js 38 bytes [optional] [built] [code generated] @@ -393,43 +379,58 @@ chunk (runtime: main) 718.output.js 38 bytes [rendered] [used exports unknown] import() context element ./foo ./templates/ lazy ^\.\/.*$ namespace object ./foo import() context element ./foo.js ./templates/ lazy ^\.\/.*$ namespace object ./foo.js -webpack 5.78.0 compiled successfully +chunk (runtime: main) 776.output.js 38 bytes [rendered] + > ./bar ./templates/ lazy ^\.\/.*$ namespace object ./bar + > ./bar.js ./templates/ lazy ^\.\/.*$ namespace object ./bar.js + ./templates/bar.js 38 bytes [optional] [built] [code generated] + [exports: default] + [used exports unknown] + import() context element ./bar ./templates/ lazy ^\.\/.*$ namespace object ./bar + import() context element ./bar.js ./templates/ lazy ^\.\/.*$ namespace object ./bar.js +chunk (runtime: main) output.js (main) 441 bytes (javascript) 5.5 KiB (runtime) [entry] [rendered] + > ./example.js main + runtime modules 5.5 KiB 8 modules + dependent modules 160 bytes [dependent] 1 module + ./example.js 281 bytes [built] [code generated] + [used exports unknown] + entry ./example.js main +webpack 5.99.6 compiled successfully ``` ## Production mode ``` -asset output.js 2.43 KiB [emitted] [minimized] (name: main) -asset 398.output.js 130 bytes [emitted] [minimized] -asset 544.output.js 130 bytes [emitted] [minimized] -asset 718.output.js 130 bytes [emitted] [minimized] -chunk (runtime: main) output.js (main) 441 bytes (javascript) 5.54 KiB (runtime) [entry] [rendered] - > ./example.js main - runtime modules 5.54 KiB 8 modules - dependent modules 160 bytes [dependent] 1 module - ./example.js 281 bytes [built] [code generated] - [no exports used] - entry ./example.js main -chunk (runtime: main) 398.output.js 38 bytes [rendered] - > ./bar ./templates/ lazy ^\.\/.*$ namespace object ./bar - > ./bar.js ./templates/ lazy ^\.\/.*$ namespace object ./bar.js - ./templates/bar.js 38 bytes [optional] [built] [code generated] - [exports: default] - import() context element ./bar ./templates/ lazy ^\.\/.*$ namespace object ./bar - import() context element ./bar.js ./templates/ lazy ^\.\/.*$ namespace object ./bar.js -chunk (runtime: main) 544.output.js 38 bytes [rendered] +asset output.js 2.42 KiB [emitted] [minimized] (name: main) +asset 717.output.js 130 bytes [emitted] [minimized] +asset 776.output.js 130 bytes [emitted] [minimized] +asset 0.output.js 124 bytes [emitted] [minimized] +chunk (runtime: main) 0.output.js 38 bytes [rendered] > ./baz ./templates/ lazy ^\.\/.*$ namespace object ./baz > ./baz.js ./templates/ lazy ^\.\/.*$ namespace object ./baz.js ./templates/baz.js 38 bytes [optional] [built] [code generated] [exports: default] import() context element ./baz ./templates/ lazy ^\.\/.*$ namespace object ./baz import() context element ./baz.js ./templates/ lazy ^\.\/.*$ namespace object ./baz.js -chunk (runtime: main) 718.output.js 38 bytes [rendered] +chunk (runtime: main) 717.output.js 38 bytes [rendered] > ./foo ./templates/ lazy ^\.\/.*$ namespace object ./foo > ./foo.js ./templates/ lazy ^\.\/.*$ namespace object ./foo.js ./templates/foo.js 38 bytes [optional] [built] [code generated] [exports: default] import() context element ./foo ./templates/ lazy ^\.\/.*$ namespace object ./foo import() context element ./foo.js ./templates/ lazy ^\.\/.*$ namespace object ./foo.js -webpack 5.78.0 compiled successfully +chunk (runtime: main) 776.output.js 38 bytes [rendered] + > ./bar ./templates/ lazy ^\.\/.*$ namespace object ./bar + > ./bar.js ./templates/ lazy ^\.\/.*$ namespace object ./bar.js + ./templates/bar.js 38 bytes [optional] [built] [code generated] + [exports: default] + import() context element ./bar ./templates/ lazy ^\.\/.*$ namespace object ./bar + import() context element ./bar.js ./templates/ lazy ^\.\/.*$ namespace object ./bar.js +chunk (runtime: main) output.js (main) 441 bytes (javascript) 5.5 KiB (runtime) [entry] [rendered] + > ./example.js main + runtime modules 5.5 KiB 8 modules + dependent modules 160 bytes [dependent] 1 module + ./example.js 281 bytes [built] [code generated] + [no exports used] + entry ./example.js main +webpack 5.99.6 compiled successfully ``` diff --git a/examples/code-splitting-specify-chunk-name/README.md b/examples/code-splitting-specify-chunk-name/README.md index 6c040a33a..6fbd27e31 100644 --- a/examples/code-splitting-specify-chunk-name/README.md +++ b/examples/code-splitting-specify-chunk-name/README.md @@ -50,19 +50,19 @@ export default foo; var map = { "./bar": [ 3, - 791 + 994 ], "./bar.js": [ 3, - 791 + 994 ], "./baz": [ 4, - 548 + 792 ], "./baz.js": [ 4, - 548 + 792 ] }; function webpackAsyncContext(req) { @@ -183,6 +183,7 @@ module.exports = webpackAsyncContext; /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } /******/ +/******/ /******/ script.src = url; /******/ } /******/ inProgress[url] = [done]; @@ -227,7 +228,7 @@ module.exports = webpackAsyncContext; /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded /******/ var installedChunks = { -/******/ 179: 0 +/******/ 411: 0 /******/ }; /******/ /******/ __webpack_require__.f.j = (chunkId, promises) => { @@ -264,7 +265,7 @@ module.exports = webpackAsyncContext; /******/ } /******/ }; /******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId); -/******/ } else installedChunks[chunkId] = 0; +/******/ } /******/ } /******/ } /******/ }; @@ -323,11 +324,11 @@ var __webpack_exports__ = {}; \********************/ /*! unknown exports (runtime-defined) */ /*! runtime requirements: __webpack_require__, __webpack_require__.e, __webpack_require__.* */ -__webpack_require__.e(/*! import() | chunk-foo */ 930).then(__webpack_require__.bind(__webpack_require__, /*! ./templates/foo */ 2)).then(function(foo) { +__webpack_require__.e(/*! import() | chunk-foo */ 45).then(__webpack_require__.bind(__webpack_require__, /*! ./templates/foo */ 2)).then(function(foo) { console.log('foo:', foo); }) -__webpack_require__.e(/*! require.ensure | chunk-foo1 */ 930).then((function(require) { +__webpack_require__.e(/*! require.ensure | chunk-foo1 */ 45).then((function(require) { var foo = __webpack_require__(/*! ./templates/foo */ 2); console.log('foo:', foo); }).bind(null, __webpack_require__))['catch'](__webpack_require__.oe); @@ -351,33 +352,10 @@ __webpack_require__(1)("./ba" + createContextVar).then(function(bar) { ``` asset output.js 11.3 KiB [emitted] (name: main) -asset 548.output.js 858 bytes [emitted] (name: chunk-bar-baz2) -asset 791.output.js 858 bytes [emitted] (name: chunk-bar-baz0) -asset 930.output.js 858 bytes [emitted] (name: chunk-foo) -chunk (runtime: main) output.js (main) 565 bytes (javascript) 5.54 KiB (runtime) [entry] [rendered] - > ./example.js main - runtime modules 5.54 KiB 8 modules - dependent modules 160 bytes [dependent] 1 module - ./example.js 405 bytes [built] [code generated] - [used exports unknown] - entry ./example.js main -chunk (runtime: main) 548.output.js (chunk-bar-baz2) 38 bytes [rendered] - > ./baz ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./baz - > ./baz.js ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./baz.js - ./templates/baz.js 38 bytes [optional] [built] [code generated] - [exports: default] - [used exports unknown] - import() context element ./baz ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./baz - import() context element ./baz.js ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./baz.js -chunk (runtime: main) 791.output.js (chunk-bar-baz0) 38 bytes [rendered] - > ./bar ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./bar - > ./bar.js ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./bar.js - ./templates/bar.js 38 bytes [optional] [built] [code generated] - [exports: default] - [used exports unknown] - import() context element ./bar ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./bar - import() context element ./bar.js ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./bar.js -chunk (runtime: main) 930.output.js (chunk-foo) 38 bytes [rendered] +asset 792.output.js 858 bytes [emitted] (name: chunk-bar-baz2) +asset 994.output.js 858 bytes [emitted] (name: chunk-bar-baz0) +asset 45.output.js 857 bytes [emitted] (name: chunk-foo) +chunk (runtime: main) 45.output.js (chunk-foo) 38 bytes [rendered] > ./templates/foo ./example.js 1:0-62 > ./example.js 5:0-8:16 ./templates/foo.js 38 bytes [built] [code generated] @@ -385,43 +363,66 @@ chunk (runtime: main) 930.output.js (chunk-foo) 38 bytes [rendered] [used exports unknown] import() ./templates/foo ./example.js 1:0-62 cjs require ./templates/foo ./example.js 6:11-37 -webpack 5.78.0 compiled successfully +chunk (runtime: main) output.js (main) 565 bytes (javascript) 5.5 KiB (runtime) [entry] [rendered] + > ./example.js main + runtime modules 5.5 KiB 8 modules + dependent modules 160 bytes [dependent] 1 module + ./example.js 405 bytes [built] [code generated] + [used exports unknown] + entry ./example.js main +chunk (runtime: main) 792.output.js (chunk-bar-baz2) 38 bytes [rendered] + > ./baz ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./baz + > ./baz.js ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./baz.js + ./templates/baz.js 38 bytes [optional] [built] [code generated] + [exports: default] + [used exports unknown] + import() context element ./baz ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./baz + import() context element ./baz.js ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./baz.js +chunk (runtime: main) 994.output.js (chunk-bar-baz0) 38 bytes [rendered] + > ./bar ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./bar + > ./bar.js ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./bar.js + ./templates/bar.js 38 bytes [optional] [built] [code generated] + [exports: default] + [used exports unknown] + import() context element ./bar ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./bar + import() context element ./bar.js ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./bar.js +webpack 5.99.6 compiled successfully ``` ## Production mode ``` -asset output.js 2.45 KiB [emitted] [minimized] (name: main) -asset 548.output.js 130 bytes [emitted] [minimized] (name: chunk-bar-baz2) -asset 791.output.js 130 bytes [emitted] [minimized] (name: chunk-bar-baz0) -asset 930.output.js 130 bytes [emitted] [minimized] (name: chunk-foo) -chunk (runtime: main) output.js (main) 565 bytes (javascript) 5.54 KiB (runtime) [entry] [rendered] - > ./example.js main - runtime modules 5.54 KiB 8 modules - dependent modules 160 bytes [dependent] 1 module - ./example.js 405 bytes [built] [code generated] - [no exports used] - entry ./example.js main -chunk (runtime: main) 548.output.js (chunk-bar-baz2) 38 bytes [rendered] - > ./baz ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./baz - > ./baz.js ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./baz.js - ./templates/baz.js 38 bytes [optional] [built] [code generated] - [exports: default] - import() context element ./baz ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./baz - import() context element ./baz.js ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./baz.js -chunk (runtime: main) 791.output.js (chunk-bar-baz0) 38 bytes [rendered] - > ./bar ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./bar - > ./bar.js ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./bar.js - ./templates/bar.js 38 bytes [optional] [built] [code generated] - [exports: default] - import() context element ./bar ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./bar - import() context element ./bar.js ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./bar.js -chunk (runtime: main) 930.output.js (chunk-foo) 38 bytes [rendered] +asset output.js 2.44 KiB [emitted] [minimized] (name: main) +asset 994.output.js 130 bytes [emitted] [minimized] (name: chunk-bar-baz0) +asset 45.output.js 129 bytes [emitted] [minimized] (name: chunk-foo) +asset 792.output.js 126 bytes [emitted] [minimized] (name: chunk-bar-baz2) +chunk (runtime: main) 45.output.js (chunk-foo) 38 bytes [rendered] > ./templates/foo ./example.js 1:0-62 > ./example.js 5:0-8:16 ./templates/foo.js 38 bytes [built] [code generated] [exports: default] import() ./templates/foo ./example.js 1:0-62 cjs require ./templates/foo ./example.js 6:11-37 -webpack 5.78.0 compiled successfully +chunk (runtime: main) output.js (main) 565 bytes (javascript) 5.5 KiB (runtime) [entry] [rendered] + > ./example.js main + runtime modules 5.5 KiB 8 modules + dependent modules 160 bytes [dependent] 1 module + ./example.js 405 bytes [built] [code generated] + [no exports used] + entry ./example.js main +chunk (runtime: main) 792.output.js (chunk-bar-baz2) 38 bytes [rendered] + > ./baz ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./baz + > ./baz.js ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./baz.js + ./templates/baz.js 38 bytes [optional] [built] [code generated] + [exports: default] + import() context element ./baz ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./baz + import() context element ./baz.js ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./baz.js +chunk (runtime: main) 994.output.js (chunk-bar-baz0) 38 bytes [rendered] + > ./bar ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./bar + > ./bar.js ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./bar.js + ./templates/bar.js 38 bytes [optional] [built] [code generated] + [exports: default] + import() context element ./bar ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./bar + import() context element ./bar.js ./templates/ lazy ^\.\/ba.*$ chunkName: chunk-bar-baz namespace object ./bar.js +webpack 5.99.6 compiled successfully ``` diff --git a/examples/code-splitting/README.md b/examples/code-splitting/README.md index 3ca0abe8d..868797eb9 100644 --- a/examples/code-splitting/README.md +++ b/examples/code-splitting/README.md @@ -149,6 +149,7 @@ require.ensure(["c"], function(require) { /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } /******/ +/******/ /******/ script.src = url; /******/ } /******/ inProgress[url] = [done]; @@ -182,7 +183,7 @@ require.ensure(["c"], function(require) { /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded /******/ var installedChunks = { -/******/ 179: 0 +/******/ "main": 0 /******/ }; /******/ /******/ __webpack_require__.f.j = (chunkId, promises) => { @@ -219,7 +220,7 @@ require.ensure(["c"], function(require) { /******/ } /******/ }; /******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId); -/******/ } else installedChunks[chunkId] = 0; +/******/ } /******/ } /******/ } /******/ }; @@ -270,7 +271,6 @@ require.ensure(["c"], function(require) { ``` js -var __webpack_exports__ = {}; // This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. (() => { /*!********************!*\ @@ -280,7 +280,7 @@ var __webpack_exports__ = {}; /*! runtime requirements: __webpack_require__, __webpack_require__.e, __webpack_require__.* */ var a = __webpack_require__(/*! a */ 1); var b = __webpack_require__(/*! b */ 2); -__webpack_require__.e(/*! require.ensure */ 796).then((function(require) { +__webpack_require__.e(/*! require.ensure */ "node_modules_c_js-node_modules_d_js").then((function(require) { (__webpack_require__(/*! b */ 2).xyz)(); var d = __webpack_require__(/*! d */ 4); }).bind(null, __webpack_require__))['catch'](__webpack_require__.oe); @@ -290,10 +290,10 @@ __webpack_require__.e(/*! require.ensure */ 796).then((function(require) { ; ``` -# dist/796.output.js +# dist/node_modules_c_js-node_modules_d_js.output.js ```javascript -(self["webpackChunk"] = self["webpackChunk"] || []).push([[796],[ +(self["webpackChunk"] = self["webpackChunk"] || []).push([["node_modules_c_js-node_modules_d_js"],[ /* 0 */, /* 1 */, /* 2 */, @@ -325,7 +325,7 @@ __webpack_require__.e(/*! require.ensure */ 796).then((function(require) { Minimized ```javascript -(self.webpackChunk=self.webpackChunk||[]).push([[796],{286:()=>{},882:()=>{}}]); +(self.webpackChunk=self.webpackChunk||[]).push([["node_modules_c_js-node_modules_d_js"],{576:()=>{},605:()=>{}}]); ``` # Info @@ -333,16 +333,16 @@ Minimized ## Unoptimized ``` -asset output.js 9.47 KiB [emitted] (name: main) -asset 796.output.js 528 bytes [emitted] -chunk (runtime: main) output.js (main) 161 bytes (javascript) 4.97 KiB (runtime) [entry] [rendered] +asset output.js 9.46 KiB [emitted] (name: main) +asset node_modules_c_js-node_modules_d_js.output.js 562 bytes [emitted] +chunk (runtime: main) output.js (main) 161 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered] > ./example.js main - runtime modules 4.97 KiB 6 modules + runtime modules 4.94 KiB 6 modules dependent modules 22 bytes [dependent] 2 modules ./example.js 139 bytes [built] [code generated] [used exports unknown] entry ./example.js main -chunk (runtime: main) 796.output.js 22 bytes [rendered] +chunk (runtime: main) node_modules_c_js-node_modules_d_js.output.js 22 bytes [rendered] > ./example.js 3:0-6:2 ./node_modules/c.js 11 bytes [built] [code generated] [used exports unknown] @@ -350,22 +350,22 @@ chunk (runtime: main) 796.output.js 22 bytes [rendered] ./node_modules/d.js 11 bytes [built] [code generated] [used exports unknown] cjs require d ./example.js 5:12-24 -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` ## Production mode ``` -asset output.js 1.74 KiB [emitted] [minimized] (name: main) -asset 796.output.js 80 bytes [emitted] [minimized] -chunk (runtime: main) output.js (main) 161 bytes (javascript) 4.97 KiB (runtime) [entry] [rendered] +asset output.js 1.77 KiB [emitted] [minimized] (name: main) +asset node_modules_c_js-node_modules_d_js.output.js 114 bytes [emitted] [minimized] +chunk (runtime: main) output.js (main) 161 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered] > ./example.js main - runtime modules 4.97 KiB 6 modules + runtime modules 4.94 KiB 6 modules dependent modules 22 bytes [dependent] 2 modules ./example.js 139 bytes [built] [code generated] [no exports used] entry ./example.js main -chunk (runtime: main) 796.output.js 22 bytes [rendered] +chunk (runtime: main) node_modules_c_js-node_modules_d_js.output.js 22 bytes [rendered] > ./example.js 3:0-6:2 ./node_modules/c.js 11 bytes [built] [code generated] [used exports unknown] @@ -373,5 +373,5 @@ chunk (runtime: main) 796.output.js 22 bytes [rendered] ./node_modules/d.js 11 bytes [built] [code generated] [used exports unknown] cjs require d ./example.js 5:12-24 -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` diff --git a/examples/code-splitting/template.md b/examples/code-splitting/template.md index 36faf649e..1b5e16233 100644 --- a/examples/code-splitting/template.md +++ b/examples/code-splitting/template.md @@ -35,16 +35,16 @@ _{{example.js}}_ _{{dist/output.js}}_ ``` -# dist/796.output.js +# dist/node_modules_c_js-node_modules_d_js.output.js ```javascript -_{{dist/796.output.js}}_ +_{{dist/node_modules_c_js-node_modules_d_js.output.js}}_ ``` Minimized ```javascript -_{{production:dist/796.output.js}}_ +_{{production:dist/node_modules_c_js-node_modules_d_js.output.js}}_ ``` # Info diff --git a/examples/code-splitting/webpack.config.js b/examples/code-splitting/webpack.config.js index 2ad01d570..115df1748 100644 --- a/examples/code-splitting/webpack.config.js +++ b/examples/code-splitting/webpack.config.js @@ -1,5 +1,5 @@ module.exports = { optimization: { - chunkIds: "deterministic" // To keep filename consistent between different modes (for example building only) + chunkIds: "named" // To keep filename consistent between different modes (for example building only) } }; diff --git a/examples/coffee-script/README.md b/examples/coffee-script/README.md index 406267c77..3e0a9a4fe 100644 --- a/examples/coffee-script/README.md +++ b/examples/coffee-script/README.md @@ -98,7 +98,6 @@ module.exports = 42; ``` js -var __webpack_exports__ = {}; // This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. (() => { /*!********************!*\ @@ -118,14 +117,14 @@ console.log(__webpack_require__(/*! ./cup1 */ 1)); ## Unoptimized ``` -asset output.js 2.27 KiB [emitted] (name: main) +asset output.js 2.24 KiB [emitted] (name: main) chunk (runtime: main) output.js (main) 206 bytes [entry] [rendered] > ./example.js main dependent modules 175 bytes [dependent] 2 modules ./example.js 31 bytes [built] [code generated] [used exports unknown] entry ./example.js main -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` ## Production mode @@ -138,5 +137,5 @@ chunk (runtime: main) output.js (main) 206 bytes [entry] [rendered] ./example.js 31 bytes [built] [code generated] [no exports used] entry ./example.js main -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` diff --git a/examples/common-chunk-and-vendor-chunk/README.md b/examples/common-chunk-and-vendor-chunk/README.md index 8346e48a6..41b80691c 100644 --- a/examples/common-chunk-and-vendor-chunk/README.md +++ b/examples/common-chunk-and-vendor-chunk/README.md @@ -34,7 +34,7 @@ With this bundle configuration, you would load your third party libraries, then # webpack.config.js ```javascript -var path = require("path"); +const path = require("path"); module.exports = { // mode: "development" || "production", @@ -719,7 +719,7 @@ chunk (runtime: pageA, pageB) vendor.js (vendor) (id hint: vendor) 54 bytes [ini [used exports unknown] cjs self exports reference ./node_modules/vendor2.js 1:0-14 cjs require vendor2 ./pageB.js 1:14-32 -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` ## Production mode @@ -732,7 +732,7 @@ asset pageA.js 1 KiB [emitted] [minimized] (name: pageA) asset pageB.js 1020 bytes [emitted] [minimized] (name: pageB) asset pageC.js 1010 bytes [emitted] [minimized] (name: pageC) asset vendor.js 121 bytes [emitted] [minimized] (name: vendor) (id hint: vendor) -Entrypoint pageA 1.23 KiB = vendor.js 121 bytes commons-utility2_js.js 106 bytes pageA.js 1 KiB +Entrypoint pageA 1.22 KiB = vendor.js 121 bytes commons-utility2_js.js 106 bytes pageA.js 1 KiB Entrypoint pageB 1.32 KiB = vendor.js 121 bytes commons-utility2_js.js 106 bytes commons-utility3_js.js 106 bytes pageB.js 1020 bytes Entrypoint pageC 1.19 KiB = commons-utility2_js.js 106 bytes commons-utility3_js.js 106 bytes pageC.js 1010 bytes chunk (runtime: pageA, pageB, pageC) commons-utility2_js.js (id hint: commons) 28 bytes [initial] [rendered] split chunk (cache group: commons) @@ -786,5 +786,5 @@ chunk (runtime: pageA, pageB) vendor.js (vendor) (id hint: vendor) 54 bytes [ini [used exports unknown] cjs self exports reference ./node_modules/vendor2.js 1:0-14 cjs require vendor2 ./pageB.js 1:14-32 -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` diff --git a/examples/common-chunk-grandchildren/README.md b/examples/common-chunk-grandchildren/README.md index b2827e378..998c65089 100644 --- a/examples/common-chunk-grandchildren/README.md +++ b/examples/common-chunk-grandchildren/README.md @@ -94,7 +94,7 @@ module.exports = { splitChunks: { minSize: 0 // This example is too small, in practice you can use the defaults }, - chunkIds: "deterministic" // To keep filename consistent between different modes (for example building only) + chunkIds: "named" // To keep filename consistent between different modes (for example building only) }, output: { path: path.resolve(__dirname, "dist"), @@ -194,6 +194,7 @@ module.exports = { /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } /******/ +/******/ /******/ script.src = url; /******/ } /******/ inProgress[url] = [done]; @@ -227,7 +228,7 @@ module.exports = { /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded /******/ var installedChunks = { -/******/ 179: 0 +/******/ "main": 0 /******/ }; /******/ /******/ __webpack_require__.f.j = (chunkId, promises) => { @@ -264,7 +265,7 @@ module.exports = { /******/ } /******/ }; /******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId); -/******/ } else installedChunks[chunkId] = 0; +/******/ } /******/ } /******/ } /******/ }; @@ -315,7 +316,6 @@ module.exports = { ``` js -var __webpack_exports__ = {}; /*!********************!*\ !*** ./example.js ***! \********************/ @@ -323,11 +323,11 @@ var __webpack_exports__ = {}; /*! runtime requirements: __webpack_require__, __webpack_require__.e, __webpack_require__.* */ var main = function() { console.log("Main class"); - Promise.all(/*! require.ensure */[__webpack_require__.e(421), __webpack_require__.e(366)]).then((() => { + Promise.all(/*! require.ensure */[__webpack_require__.e("reusableComponent_js"), __webpack_require__.e("pageA_js")]).then((() => { const page = __webpack_require__(/*! ./pageA */ 1); page(); }).bind(null, __webpack_require__))['catch'](__webpack_require__.oe); - __webpack_require__.e(/*! require.ensure */ 588).then((() => { + __webpack_require__.e(/*! require.ensure */ "pageB_js").then((() => { const page = __webpack_require__(/*! ./pageB */ 3); page(); }).bind(null, __webpack_require__))['catch'](__webpack_require__.oe); @@ -339,10 +339,10 @@ main(); ; ``` -# dist/366.output.js +# dist/pageA_js.output.js ```javascript -(self["webpackChunk"] = self["webpackChunk"] || []).push([[366],[ +(self["webpackChunk"] = self["webpackChunk"] || []).push([["pageA_js"],[ /* 0 */, /* 1 */ /*!******************!*\ @@ -365,10 +365,10 @@ module.exports = function() { ]]); ``` -# dist/588.output.js +# dist/pageB_js.output.js ```javascript -(self["webpackChunk"] = self["webpackChunk"] || []).push([[588],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([["pageB_js"],{ /***/ 3: /*!******************!*\ @@ -381,7 +381,7 @@ module.exports = function() { module.exports = function() { console.log("Page B"); - Promise.all(/*! require.ensure */[__webpack_require__.e(421), __webpack_require__.e(145)]).then((()=>{ + Promise.all(/*! require.ensure */[__webpack_require__.e("reusableComponent_js"), __webpack_require__.e("pageC_js")]).then((()=>{ const page = __webpack_require__(/*! ./pageC */ 4); page(); }).bind(null, __webpack_require__))['catch'](__webpack_require__.oe); @@ -393,10 +393,10 @@ module.exports = function() { }]); ``` -# dist/145.output.js +# dist/pageC_js.output.js ```javascript -(self["webpackChunk"] = self["webpackChunk"] || []).push([[145],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([["pageC_js"],{ /***/ 4: /*!******************!*\ @@ -420,10 +420,10 @@ module.exports = function() { }]); ``` -# dist/421.output.js +# dist/reusableComponent_js.output.js ```javascript -(self["webpackChunk"] = self["webpackChunk"] || []).push([[421],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([["reusableComponent_js"],{ /***/ 2: /*!******************************!*\ @@ -449,30 +449,36 @@ module.exports = function() { ## Unoptimized ``` -asset output.js 9.09 KiB [emitted] (name: main) -asset 588.output.js 739 bytes [emitted] -asset 366.output.js 558 bytes [emitted] -asset 145.output.js 552 bytes [emitted] -asset 421.output.js 434 bytes [emitted] -chunk (runtime: main) 145.output.js 136 bytes [rendered] - > ./pageB.js 3:1-6:3 - ./pageC.js 136 bytes [built] [code generated] - [used exports unknown] - cjs require ./pageC ./pageB.js 4:15-33 - cjs self exports reference ./pageC.js 3:0-14 -chunk (runtime: main) output.js (main) 220 bytes (javascript) 4.97 KiB (runtime) [entry] [rendered] +asset output.js 9.08 KiB [emitted] (name: main) +asset pageB_js.output.js 772 bytes [emitted] +asset pageA_js.output.js 565 bytes [emitted] +asset pageC_js.output.js 559 bytes [emitted] +asset reusableComponent_js.output.js 453 bytes [emitted] +chunk (runtime: main) output.js (main) 220 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered] > ./example.js main - runtime modules 4.97 KiB 6 modules + runtime modules 4.94 KiB 6 modules ./example.js 220 bytes [built] [code generated] [used exports unknown] entry ./example.js main -chunk (runtime: main) 366.output.js 136 bytes [rendered] +chunk (runtime: main) pageA_js.output.js 136 bytes [rendered] > ./example.js 3:1-6:3 ./pageA.js 136 bytes [built] [code generated] [used exports unknown] cjs require ./pageA ./example.js 4:15-33 cjs self exports reference ./pageA.js 3:0-14 -chunk (runtime: main) 421.output.js 69 bytes [rendered] split chunk (cache group: default) +chunk (runtime: main) pageB_js.output.js 133 bytes [rendered] + > ./example.js 7:1-10:3 + ./pageB.js 133 bytes [built] [code generated] + [used exports unknown] + cjs require ./pageB ./example.js 8:15-33 + cjs self exports reference ./pageB.js 1:0-14 +chunk (runtime: main) pageC_js.output.js 136 bytes [rendered] + > ./pageB.js 3:1-6:3 + ./pageC.js 136 bytes [built] [code generated] + [used exports unknown] + cjs require ./pageC ./pageB.js 4:15-33 + cjs self exports reference ./pageC.js 3:0-14 +chunk (runtime: main) reusableComponent_js.output.js 69 bytes [rendered] split chunk (cache group: default) > ./example.js 3:1-6:3 > ./pageB.js 3:1-6:3 ./reusableComponent.js 69 bytes [built] [code generated] @@ -480,54 +486,48 @@ chunk (runtime: main) 421.output.js 69 bytes [rendered] split chunk (cache group cjs require ./reusableComponent ./pageA.js 1:24-54 cjs require ./reusableComponent ./pageC.js 1:24-54 cjs self exports reference ./reusableComponent.js 1:0-14 -chunk (runtime: main) 588.output.js 133 bytes [rendered] - > ./example.js 7:1-10:3 - ./pageB.js 133 bytes [built] [code generated] - [used exports unknown] - cjs require ./pageB ./example.js 8:15-33 - cjs self exports reference ./pageB.js 1:0-14 -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` ## Production mode ``` -asset output.js 1.79 KiB [emitted] [minimized] (name: main) -asset 588.output.js 198 bytes [emitted] [minimized] -asset 145.output.js 134 bytes [emitted] [minimized] -asset 366.output.js 134 bytes [emitted] [minimized] -asset 421.output.js 123 bytes [emitted] [minimized] -chunk (runtime: main) 145.output.js 136 bytes [rendered] - > ./pageB.js 3:1-6:3 - ./pageC.js 136 bytes [built] [code generated] - [used exports unknown] - cjs require ./pageC ./pageB.js 4:15-33 - cjs self exports reference ./pageC.js 3:0-14 -chunk (runtime: main) output.js (main) 220 bytes (javascript) 4.97 KiB (runtime) [entry] [rendered] +asset output.js 1.83 KiB [emitted] [minimized] (name: main) +asset pageB_js.output.js 231 bytes [emitted] [minimized] +asset reusableComponent_js.output.js 142 bytes [emitted] [minimized] +asset pageC_js.output.js 141 bytes [emitted] [minimized] +asset pageA_js.output.js 140 bytes [emitted] [minimized] +chunk (runtime: main) output.js (main) 220 bytes (javascript) 4.94 KiB (runtime) [entry] [rendered] > ./example.js main - runtime modules 4.97 KiB 6 modules + runtime modules 4.94 KiB 6 modules ./example.js 220 bytes [built] [code generated] [no exports used] entry ./example.js main -chunk (runtime: main) 366.output.js 136 bytes [rendered] +chunk (runtime: main) pageA_js.output.js 136 bytes [rendered] > ./example.js 3:1-6:3 ./pageA.js 136 bytes [built] [code generated] [used exports unknown] cjs require ./pageA ./example.js 4:15-33 cjs self exports reference ./pageA.js 3:0-14 -chunk (runtime: main) 421.output.js 69 bytes [rendered] split chunk (cache group: default) - > ./example.js 3:1-6:3 - > ./pageB.js 3:1-6:3 - ./reusableComponent.js 69 bytes [built] [code generated] - [used exports unknown] - cjs require ./reusableComponent ./pageA.js 1:24-54 - cjs require ./reusableComponent ./pageC.js 1:24-54 - cjs self exports reference ./reusableComponent.js 1:0-14 -chunk (runtime: main) 588.output.js 133 bytes [rendered] +chunk (runtime: main) pageB_js.output.js 133 bytes [rendered] > ./example.js 7:1-10:3 ./pageB.js 133 bytes [built] [code generated] [used exports unknown] cjs require ./pageB ./example.js 8:15-33 cjs self exports reference ./pageB.js 1:0-14 -webpack 5.78.0 compiled successfully +chunk (runtime: main) pageC_js.output.js 136 bytes [rendered] + > ./pageB.js 3:1-6:3 + ./pageC.js 136 bytes [built] [code generated] + [used exports unknown] + cjs require ./pageC ./pageB.js 4:15-33 + cjs self exports reference ./pageC.js 3:0-14 +chunk (runtime: main) reusableComponent_js.output.js 69 bytes [rendered] split chunk (cache group: default) + > ./pageB.js 3:1-6:3 + > ./example.js 3:1-6:3 + ./reusableComponent.js 69 bytes [built] [code generated] + [used exports unknown] + cjs require ./reusableComponent ./pageA.js 1:24-54 + cjs require ./reusableComponent ./pageC.js 1:24-54 + cjs self exports reference ./reusableComponent.js 1:0-14 +webpack 5.99.6 compiled successfully ``` diff --git a/examples/common-chunk-grandchildren/template.md b/examples/common-chunk-grandchildren/template.md index 6b721fbd3..7be73dfc7 100644 --- a/examples/common-chunk-grandchildren/template.md +++ b/examples/common-chunk-grandchildren/template.md @@ -61,28 +61,28 @@ _{{webpack.config.js}}_ _{{dist/output.js}}_ ``` -# dist/366.output.js +# dist/pageA_js.output.js ```javascript -_{{dist/366.output.js}}_ +_{{dist/pageA_js.output.js}}_ ``` -# dist/588.output.js +# dist/pageB_js.output.js ```javascript -_{{dist/588.output.js}}_ +_{{dist/pageB_js.output.js}}_ ``` -# dist/145.output.js +# dist/pageC_js.output.js ```javascript -_{{dist/145.output.js}}_ +_{{dist/pageC_js.output.js}}_ ``` -# dist/421.output.js +# dist/reusableComponent_js.output.js ```javascript -_{{dist/421.output.js}}_ +_{{dist/reusableComponent_js.output.js}}_ ``` # Info diff --git a/examples/common-chunk-grandchildren/webpack.config.js b/examples/common-chunk-grandchildren/webpack.config.js index ea9fdf232..55aeb1408 100644 --- a/examples/common-chunk-grandchildren/webpack.config.js +++ b/examples/common-chunk-grandchildren/webpack.config.js @@ -10,7 +10,7 @@ module.exports = { splitChunks: { minSize: 0 // This example is too small, in practice you can use the defaults }, - chunkIds: "deterministic" // To keep filename consistent between different modes (for example building only) + chunkIds: "named" // To keep filename consistent between different modes (for example building only) }, output: { path: path.resolve(__dirname, "dist"), diff --git a/examples/commonjs/README.md b/examples/commonjs/README.md index f5c30d2da..ddfad8d40 100644 --- a/examples/commonjs/README.md +++ b/examples/commonjs/README.md @@ -144,7 +144,7 @@ chunk (runtime: main) output.js (main) 326 bytes [entry] [rendered] ./example.js 72 bytes [built] [code generated] [used exports unknown] entry ./example.js main -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` ## Production mode @@ -157,5 +157,5 @@ chunk (runtime: main) output.js (main) 326 bytes [entry] [rendered] ./example.js 72 bytes [built] [code generated] [no exports used] entry ./example.js main -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` diff --git a/examples/css/README.md b/examples/css/README.md index 33ee7d658..44908e697 100644 --- a/examples/css/README.md +++ b/examples/css/README.md @@ -26,22 +26,53 @@ body { ```javascript /******/ (() => { // webpackBootstrap /******/ "use strict"; -/******/ var __webpack_modules__ = ({ - -/***/ 3: -/*!*************************!*\ - !*** ./images/file.png ***! - \*************************/ -/*! default exports */ +/******/ var __webpack_modules__ = ([ +/* 0 */, +/* 1 */ +/*!***********************!*\ + !*** css ./style.css ***! + \***********************/ +/*! namespace exports */ /*! exports [not provided] [no usage info] */ -/*! runtime requirements: __webpack_require__.p, module, __webpack_require__.* */ +/*! runtime requirements: module, has css modules */ +/***/ ((module) => { + + + +/***/ }), +/* 2 */, +/* 3 */, +/* 4 */, +/* 5 */ +/*!************************!*\ + !*** css ./style2.css ***! + \************************/ +/*! namespace exports */ +/*! exports [not provided] [no usage info] */ +/*! runtime requirements: module, has css modules */ +/***/ ((module) => { + + + +/***/ }), +/* 6 */ +/*!******************************!*\ + !*** css ./style.module.css ***! + \******************************/ +/*! namespace exports */ +/*! export large [provided] [no usage info] [missing usage info prevents renaming] */ +/*! export main [provided] [no usage info] [missing usage info prevents renaming] */ +/*! other exports [not provided] [no usage info] */ +/*! runtime requirements: module, __webpack_require__.r, has css modules, __webpack_require__.* */ /***/ ((module, __unused_webpack_exports, __webpack_require__) => { -module.exports = __webpack_require__.p + "89a353e9c515885abd8e.png"; +__webpack_require__.r(module.exports = { + "large": "--app-6-large", + "main": "app-6-main" +}); /***/ }) - -/******/ }); +/******/ ]); ```
/* webpack runtime code */ @@ -137,6 +168,7 @@ module.exports = __webpack_require__.p + "89a353e9c515885abd8e.png"; /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } /******/ script.setAttribute("data-webpack", dataWebpackPrefix + key); +/******/ /******/ script.src = url; /******/ } /******/ inProgress[url] = [done]; @@ -178,28 +210,11 @@ module.exports = __webpack_require__.p + "89a353e9c515885abd8e.png"; /******/ // object to store loaded and loading chunks /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded -/******/ var installedChunks = {}; +/******/ var installedChunks = { +/******/ 0: 0 +/******/ }; /******/ /******/ var uniqueName = "app"; -/******/ var loadCssChunkData = (target, link, chunkId) => { -/******/ var data, token = "", token2, exports = {}, exportsWithId = [], exportsWithDashes = [], i = 0, cc = 1; -/******/ try { if(!link) link = loadStylesheet(chunkId); data = link.sheet.cssRules; data = data[data.length - 1].style; } catch(e) { data = getComputedStyle(document.head); } -/******/ data = data.getPropertyValue("--webpack-" + uniqueName + "-" + chunkId); -/******/ if(!data) return []; -/******/ for(; cc; i++) { -/******/ cc = data.charCodeAt(i); -/******/ if(cc == 40) { token2 = token; token = ""; } -/******/ else if(cc == 41) { exports[token2.replace(/^_/, "")] = token.replace(/^_/, ""); token = ""; } -/******/ else if(cc == 47 || cc == 37) { token = token.replace(/^_/, ""); exports[token] = token; exportsWithId.push(token); if(cc == 37) exportsWithDashes.push(token); token = ""; } -/******/ else if(!cc || cc == 44) { token = token.replace(/^_/, ""); exportsWithId.forEach((x) => (exports[x] = uniqueName + "-" + token + "-" + exports[x])); exportsWithDashes.forEach((x) => (exports[x] = "--" + exports[x])); __webpack_require__.r(exports); target[token] = ((exports, module) => { -/******/ module.exports = exports; -/******/ }).bind(null, exports); token = ""; exports = {}; exportsWithId.length = 0; } -/******/ else if(cc == 92) { token += data[++i] } -/******/ else { token += data[i]; } -/******/ } -/******/ installedChunks[chunkId] = 0; -/******/ -/******/ } /******/ var loadingAttribute = "data-webpack-loading"; /******/ var loadStylesheet = (chunkId, url, done) => { /******/ var link, needAttach, key = "chunk-" + chunkId; @@ -214,7 +229,12 @@ module.exports = __webpack_require__.p + "89a353e9c515885abd8e.png"; /******/ if(!link) { /******/ needAttach = true; /******/ link = document.createElement('link'); +/******/ link.charset = 'utf-8'; +/******/ if (__webpack_require__.nc) { +/******/ link.setAttribute("nonce", __webpack_require__.nc); +/******/ } /******/ link.setAttribute("data-webpack", uniqueName + ":" + key); +/******/ /******/ link.setAttribute(loadingAttribute, 1); /******/ link.rel = "stylesheet"; /******/ link.href = url; @@ -233,11 +253,10 @@ module.exports = __webpack_require__.p + "89a353e9c515885abd8e.png"; /******/ link.onload = onLinkComplete.bind(null, link.onload); /******/ } else onLinkComplete(undefined, { type: 'load', target: link }); /******/ +/******/ /******/ needAttach && document.head.appendChild(link); /******/ return link; /******/ }; -/******/ loadCssChunkData(__webpack_require__.m, 0, 0); -/******/ /******/ __webpack_require__.f.css = (chunkId, promises) => { /******/ // css chunk loading /******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined; @@ -263,25 +282,29 @@ module.exports = __webpack_require__.p + "89a353e9c515885abd8e.png"; /******/ if(installedChunkData) { /******/ if(event.type !== "load") { /******/ var errorType = event && event.type; -/******/ var realSrc = event && event.target && event.target.src; -/******/ error.message = 'Loading css chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')'; +/******/ var realHref = event && event.target && event.target.href; +/******/ error.message = 'Loading css chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realHref + ')'; /******/ error.name = 'ChunkLoadError'; /******/ error.type = errorType; -/******/ error.request = realSrc; +/******/ error.request = realHref; /******/ installedChunkData[1](error); /******/ } else { -/******/ loadCssChunkData(__webpack_require__.m, link, chunkId); +/******/ installedChunks[chunkId] = 0; /******/ installedChunkData[0](); /******/ } /******/ } /******/ } /******/ }; -/******/ var link = loadStylesheet(chunkId, url, loadingEnded); +/******/ +/******/ loadStylesheet(chunkId, url, loadingEnded); /******/ } else installedChunks[chunkId] = 0; /******/ } /******/ } /******/ }; /******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded /******/ // no hmr /******/ })(); /******/ @@ -305,7 +328,7 @@ module.exports = __webpack_require__.p + "89a353e9c515885abd8e.png"; /******/ if(installedChunkData) { /******/ promises.push(installedChunkData[2]); /******/ } else { -/******/ if(0 == chunkId) { +/******/ if(true) { // all chunks have JS /******/ // setup Promise in chunk cache /******/ var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject])); /******/ promises.push(installedChunkData[2] = promise); @@ -330,7 +353,7 @@ module.exports = __webpack_require__.p + "89a353e9c515885abd8e.png"; /******/ } /******/ }; /******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId); -/******/ } else installedChunks[chunkId] = 0; +/******/ } /******/ } /******/ } /******/ }; @@ -410,23 +433,38 @@ document.getElementsByTagName("main")[0].className = _style_module_css__WEBPACK_ # dist/output.css ```javascript +/*!********************************************************************!*\ + !*** external "https://fonts.googleapis.com/css?family=Open+Sans" ***! + \********************************************************************/ @import url("https://fonts.googleapis.com/css?family=Open+Sans"); +/*!********************************!*\ + !*** css ./style-imported.css ***! + \********************************/ .img { width: 150px; height: 150px; - background: url(89a353e9c515885abd8e.png); + background: url(dist/89a353e9c515885abd8e.png); } +/*!***********************!*\ + !*** css ./style.css ***! + \***********************/ body { background: green; font-family: "Open Sans"; } +/*!************************!*\ + !*** css ./style2.css ***! + \************************/ body { background: red; } +/*!******************************!*\ + !*** css ./style.module.css ***! + \******************************/ :root { --app-6-large: 72px; } @@ -447,8 +485,6 @@ body { display: grid } } - -head{--webpack-app-0:_4,_2,_1,_5,large%main/_6;} ``` ## production @@ -458,7 +494,7 @@ head{--webpack-app-0:_4,_2,_1,_5,large%main/_6;} .img { width: 150px; height: 150px; - background: url(89a353e9c515885abd8e.png); + background: url(dist/89a353e9c515885abd8e.png); } @@ -472,37 +508,36 @@ body { } :root { - --app-491-b: 72px; + --app-235-a: 72px; } -.app-491-D { - font-size: var(--app-491-b); +.app-235-i { + font-size: var(--app-235-a); color: darkblue; } @media (min-width: 1024px) { - .app-491-D { + .app-235-i { color: green; } } @supports (display: grid) { - .app-491-D { + .app-235-i { display: grid } } - -head{--webpack-app-179:_548,_431,_258,_268,b%D/_491;} ``` # dist/1.output.css ```javascript +/*!****************************!*\ + !*** css ./lazy-style.css ***! + \****************************/ body { color: blue; } - -head{--webpack-app-1:_7;} ``` # Info @@ -510,50 +545,61 @@ head{--webpack-app-1:_7;} ## Unoptimized ``` -assets by chunk 17 KiB (name: main) - asset output.js 16.5 KiB [emitted] (name: main) - asset output.css 516 bytes [emitted] (name: main) +assets by path *.js 16.3 KiB + asset output.js 15.9 KiB [emitted] (name: main) + asset 1.output.js 357 bytes [emitted] +assets by path *.css 1.19 KiB + asset output.css 1.06 KiB [emitted] (name: main) + asset 1.output.css 125 bytes [emitted] asset 89a353e9c515885abd8e.png 14.6 KiB [emitted] [immutable] [from: images/file.png] (auxiliary name: main) -asset 1.output.css 49 bytes [emitted] -Entrypoint main 17 KiB (14.6 KiB) = output.js 16.5 KiB output.css 516 bytes 1 auxiliary asset -chunk (runtime: main) output.js, output.css (main) 218 bytes (javascript) 454 bytes (css) 14.6 KiB (asset) 42 bytes (css-import) 10 KiB (runtime) [entry] [rendered] +Entrypoint main 17 KiB (14.6 KiB) = output.js 15.9 KiB output.css 1.06 KiB 1 auxiliary asset +chunk (runtime: main) output.js, output.css (main) 265 bytes (javascript) 454 bytes (css) 14.6 KiB (asset) 42 bytes (css-url) 42 bytes (css-import) 8.82 KiB (runtime) [entry] [rendered] > ./example.js main - runtime modules 10 KiB 9 modules - dependent modules 42 bytes (javascript) 14.6 KiB (asset) 454 bytes (css) 42 bytes (css-import) [dependent] 6 modules + runtime modules 8.82 KiB 9 modules + dependent modules 14.6 KiB (asset) 42 bytes (css-url) 454 bytes (css) 89 bytes (javascript) 42 bytes (css-import) [dependent] 6 modules ./example.js 176 bytes [built] [code generated] [no exports] [used exports unknown] entry ./example.js main -chunk (runtime: main) 1.output.css 23 bytes +chunk (runtime: main) 1.output.js, 1.output.css 1 bytes (javascript) 23 bytes (css) [rendered] > ./lazy-style.css ./example.js 4:0-26 - ./lazy-style.css 23 bytes [built] [code generated] + css ./lazy-style.css 1 bytes (javascript) 23 bytes (css) [built] [code generated] [no exports] [used exports unknown] import() ./lazy-style.css ./example.js 4:0-26 -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` ## Production mode ``` -assets by chunk 4.38 KiB (name: main) - asset output.js 3.88 KiB [emitted] [minimized] (name: main) - asset output.css 514 bytes [emitted] (name: main) +assets by path *.js 3.44 KiB + asset output.js 3.35 KiB [emitted] [minimized] (name: main) + asset 822.output.js 87 bytes [emitted] [minimized] +assets by path *.css 490 bytes + asset output.css 466 bytes [emitted] (name: main) + asset 822.output.css 24 bytes [emitted] asset 89a353e9c515885abd8e.png 14.6 KiB [emitted] [immutable] [from: images/file.png] (auxiliary name: main) -asset 159.output.css 53 bytes [emitted] -Entrypoint main 4.38 KiB (14.6 KiB) = output.js 3.88 KiB output.css 514 bytes 1 auxiliary asset -chunk (runtime: main) 159.output.css 23 bytes - > ./lazy-style.css ./example.js 4:0-26 - ./lazy-style.css 23 bytes [built] [code generated] - [no exports] - import() ./lazy-style.css ./example.js 4:0-26 -chunk (runtime: main) output.js, output.css (main) 218 bytes (javascript) 454 bytes (css) 14.6 KiB (asset) 42 bytes (css-import) 10 KiB (runtime) [entry] [rendered] +Entrypoint main 3.81 KiB (14.6 KiB) = output.js 3.35 KiB output.css 466 bytes 1 auxiliary asset +chunk (runtime: main) output.js, output.css (main) 299 bytes (javascript) 454 bytes (css) 14.6 KiB (asset) 42 bytes (css-url) 42 bytes (css-import) 8.82 KiB (runtime) [entry] [rendered] > ./example.js main - runtime modules 10 KiB 9 modules - dependent modules 42 bytes (javascript) 14.6 KiB (asset) 454 bytes (css) 42 bytes (css-import) [dependent] 6 modules - ./example.js 176 bytes [built] [code generated] + runtime modules 8.82 KiB 9 modules + dependent modules 14.6 KiB (asset) 42 bytes (css-url) 119 bytes (javascript) 279 bytes (css) 42 bytes (css-import) [dependent] 4 modules + cacheable modules 180 bytes (javascript) 175 bytes (css) + ./example.js + 2 modules 178 bytes [built] [code generated] + [no exports] + [no exports used] + entry ./example.js main + css ./style.css 1 bytes (javascript) 148 bytes (css) [built] [code generated] + [no exports] + [no exports used] + css ./style2.css 1 bytes (javascript) 27 bytes (css) [built] [code generated] + [no exports] + [no exports used] +chunk (runtime: main) 822.output.js, 822.output.css 1 bytes (javascript) 23 bytes (css) [rendered] + > ./lazy-style.css ./example.js 4:0-26 + css ./lazy-style.css 1 bytes (javascript) 23 bytes (css) [built] [code generated] [no exports] - [no exports used] - entry ./example.js main -webpack 5.78.0 compiled successfully + import() ./lazy-style.css ./example.js + 2 modules ./example.js 4:0-26 +webpack 5.99.6 compiled successfully ``` diff --git a/examples/custom-json-modules/README.md b/examples/custom-json-modules/README.md index 1dcdceef3..afa8ef45e 100644 --- a/examples/custom-json-modules/README.md +++ b/examples/custom-json-modules/README.md @@ -119,7 +119,7 @@ module.exports = { /*! runtime requirements: module */ /***/ ((module) => { -module.exports = JSON.parse('{"title":"TOML Example","owner":{"name":"Tom Preston-Werner","organization":"GitHub","bio":"GitHub Cofounder & CEO\\nLikes tater tots and beer.","dob":"1979-05-27T07:32:00.000Z"}}'); +module.exports = /*#__PURE__*/JSON.parse('{"title":"TOML Example","owner":{"name":"Tom Preston-Werner","organization":"GitHub","bio":"GitHub Cofounder & CEO\\nLikes tater tots and beer.","dob":"1979-05-27T07:32:00.000Z"}}'); /***/ }), /* 2 */ @@ -139,7 +139,7 @@ module.exports = JSON.parse('{"title":"TOML Example","owner":{"name":"Tom Presto /*! runtime requirements: module */ /***/ ((module) => { -module.exports = JSON.parse('{"title":"YAML Example","owner":{"name":"Tom Preston-Werner","organization":"GitHub","bio":"GitHub Cofounder & CEO\\nLikes tater tots and beer.","dob":"1979-05-27T07:32:00.000Z"}}'); +module.exports = /*#__PURE__*/JSON.parse('{"title":"YAML Example","owner":{"name":"Tom Preston-Werner","organization":"GitHub","bio":"GitHub Cofounder & CEO\\nLikes tater tots and beer.","dob":"1979-05-27T07:32:00.000Z"}}'); /***/ }), /* 3 */ @@ -158,7 +158,7 @@ module.exports = JSON.parse('{"title":"YAML Example","owner":{"name":"Tom Presto /*! runtime requirements: module */ /***/ ((module) => { -module.exports = JSON.parse('{"title":"JSON5 Example","owner":{"name":"Tom Preston-Werner","organization":"GitHub","bio":"GitHub Cofounder & CEO\\nLikes tater tots and beer.","dob":"1979-05-27T07:32:00.000Z"}}'); +module.exports = /*#__PURE__*/JSON.parse('{"title":"JSON5 Example","owner":{"name":"Tom Preston-Werner","organization":"GitHub","bio":"GitHub Cofounder & CEO\\nLikes tater tots and beer.","dob":"1979-05-27T07:32:00.000Z"}}'); /***/ }) /******/ ]); @@ -246,7 +246,7 @@ document.querySelector('#app').innerHTML = [_data_toml__WEBPACK_IMPORTED_MODULE_ ## webpack output ``` -asset output.js 5.87 KiB [emitted] (name: main) +asset output.js 5.91 KiB [emitted] (name: main) chunk (runtime: main) output.js (main) 919 bytes (javascript) 274 bytes (runtime) [entry] [rendered] > ./example.js main dependent modules 565 bytes [dependent] 3 modules @@ -255,5 +255,5 @@ chunk (runtime: main) output.js (main) 919 bytes (javascript) 274 bytes (runtime [no exports] [used exports unknown] entry ./example.js main -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` diff --git a/examples/dll-app-and-vendor/0-vendor/README.md b/examples/dll-app-and-vendor/0-vendor/README.md index 58dff010f..5ede0e8f0 100644 --- a/examples/dll-app-and-vendor/0-vendor/README.md +++ b/examples/dll-app-and-vendor/0-vendor/README.md @@ -68,7 +68,7 @@ module.exports = __webpack_require__; "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "square": () => (/* binding */ square) +/* harmony export */ square: () => (/* binding */ square) /* harmony export */ }); function square(n) { return n * n; @@ -171,9 +171,9 @@ chunk (runtime: main) vendor.js (main) 57 bytes (javascript) 670 bytes (runtime) dependent modules 45 bytes [dependent] 1 module dll main 12 bytes [built] [code generated] [used exports unknown] - dll entry + dll entry 0:0-0 used as library export -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` ## Production mode @@ -185,7 +185,7 @@ chunk (runtime: main) vendor.js (main) 57 bytes (javascript) 670 bytes (runtime) runtime modules 670 bytes 3 modules dependent modules 45 bytes [dependent] 1 module dll main 12 bytes [built] [code generated] - dll entry + dll entry 0:0-0 used as library export -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` diff --git a/examples/dll-app-and-vendor/1-app/README.md b/examples/dll-app-and-vendor/1-app/README.md index 59993182b..a16988214 100644 --- a/examples/dll-app-and-vendor/1-app/README.md +++ b/examples/dll-app-and-vendor/1-app/README.md @@ -163,13 +163,13 @@ chunk (runtime: main) app.js (main) 178 bytes (javascript) 274 bytes (runtime) [ [no exports] [used exports unknown] entry ./example-app main -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ``` ## Production mode ``` -asset app.js 333 bytes [emitted] [minimized] (name: main) +asset app.js 331 bytes [emitted] [minimized] (name: main) chunk (runtime: main) app.js (main) 178 bytes [entry] [rendered] > ./example-app main dependent modules 84 bytes [dependent] 2 modules @@ -177,7 +177,7 @@ chunk (runtime: main) app.js (main) 178 bytes [entry] [rendered] [no exports] [no exports used] entry ./example-app main -webpack 5.78.0 compiled successfully +webpack 5.99.6 compiled successfully ```