From d7d87e6546248319a682463792a864da2d2c3300 Mon Sep 17 00:00:00 2001 From: hardfist Date: Mon, 4 Dec 2023 15:29:44 +0800 Subject: [PATCH] feat: align chunkIds default value with webpack (#4822) --- .../hooks/asset-emitted/rspack.config.js | 4 + packages/rspack/src/config/defaults.ts | 6 +- packages/rspack/tests/Defaults.unittest.ts | 4 + packages/rspack/tests/Stats.test.ts | 18 +- .../tests/__snapshots__/Stats.test.ts.snap | 46 +- .../__snapshots__/StatsTestCases.test.ts.snap | 1154 ++++++++--------- .../default/webpack.config.js | 5 +- .../entry/no-chunking/test.config.js | 2 +- .../entry/no-chunking/webpack.config.js | 2 +- 9 files changed, 628 insertions(+), 613 deletions(-) diff --git a/packages/playground/cases/hooks/asset-emitted/rspack.config.js b/packages/playground/cases/hooks/asset-emitted/rspack.config.js index 2cd065d42b3..e463bd175ec 100644 --- a/packages/playground/cases/hooks/asset-emitted/rspack.config.js +++ b/packages/playground/cases/hooks/asset-emitted/rspack.config.js @@ -9,7 +9,11 @@ module.exports = { } ] }, + optimization: { + chunkIds: "named" + }, output: { clean: true }, + experiments: { incrementalRebuild: { emitAsset: true diff --git a/packages/rspack/src/config/defaults.ts b/packages/rspack/src/config/defaults.ts index 7e86f2c949b..6c9ea210502 100644 --- a/packages/rspack/src/config/defaults.ts +++ b/packages/rspack/src/config/defaults.ts @@ -744,7 +744,11 @@ const applyOptimizationDefaults = ( if (production) return "deterministic"; return "named"; }); - F(optimization, "chunkIds", (): "named" | "deterministic" => "named"); + F(optimization, "chunkIds", (): "named" | "deterministic" => { + if (production) return "deterministic"; + if (development) return "named"; + return "named"; // we have not implemented 'natural' so use 'named' now + }); F(optimization, "sideEffects", () => (production ? true : "flag")); D(optimization, "mangleExports", production); D(optimization, "providedExports", true); diff --git a/packages/rspack/tests/Defaults.unittest.ts b/packages/rspack/tests/Defaults.unittest.ts index 97c56f1cdc7..5b3332fdc4c 100644 --- a/packages/rspack/tests/Defaults.unittest.ts +++ b/packages/rspack/tests/Defaults.unittest.ts @@ -108,8 +108,10 @@ describe("snapshots", () => { - "mode": "none", + "mode": undefined, @@ ... @@ + - "chunkIds": "named", - "innerGraph": false, - "mangleExports": false, + + "chunkIds": "deterministic", + "innerGraph": true, + "mangleExports": true, @@ ... @@ @@ -156,8 +158,10 @@ describe("snapshots", () => { - "mode": "none", + "mode": "production", @@ ... @@ + - "chunkIds": "named", - "innerGraph": false, - "mangleExports": false, + + "chunkIds": "deterministic", + "innerGraph": true, + "mangleExports": true, @@ ... @@ diff --git a/packages/rspack/tests/Stats.test.ts b/packages/rspack/tests/Stats.test.ts index 31081eff679..abc8449c94b 100644 --- a/packages/rspack/tests/Stats.test.ts +++ b/packages/rspack/tests/Stats.test.ts @@ -27,15 +27,15 @@ describe("Stats", () => { expect(stats?.toJson(statsOptions)).toMatchSnapshot(); expect(stats?.toString(statsOptions)).toMatchInlineSnapshot(` "PublicPath: auto - asset main.js 211 bytes {main} [emitted] (name: main) + asset main.js 211 bytes {909} [emitted] (name: main) Entrypoint main 211 bytes = main.js - chunk {main} main.js (main) [entry] - ./fixtures/a.js [585] {main} + chunk {909} main.js (main) [entry] + ./fixtures/a.js [585] {909} entry ./fixtures/a - ./fixtures/a.js [585] {main} + ./fixtures/a.js [585] {909} entry ./fixtures/a - Rspack compiled successfully (a62f45ec3d75aa689fa1)" + Rspack compiled successfully (57e46af248a1c1fe076f)" `); }); @@ -82,7 +82,7 @@ describe("Stats", () => { help: You may need an appropriate loader to handle this file type. - Rspack compiled with 1 error (79a430f2fdbcdc199916)" + Rspack compiled with 1 error (d26fd8b8f7a3bc36f9b5)" `); }); @@ -353,9 +353,9 @@ describe("Stats", () => { }; expect(stats?.toJson(options)).toMatchSnapshot(); expect(stats?.toString(options).replace(/\\/g, "/")).toMatchInlineSnapshot(` - "asset main.js 211 bytes {main} [emitted] (name: main) - chunk {main} main.js (main) [entry] - ./fixtures/a.js [585] {main}" + "asset main.js 211 bytes {909} [emitted] (name: main) + chunk {909} main.js (main) [entry] + ./fixtures/a.js [585] {909}" `); }); diff --git a/packages/rspack/tests/__snapshots__/Stats.test.ts.snap b/packages/rspack/tests/__snapshots__/Stats.test.ts.snap index f56f2e4d572..31756859814 100644 --- a/packages/rspack/tests/__snapshots__/Stats.test.ts.snap +++ b/packages/rspack/tests/__snapshots__/Stats.test.ts.snap @@ -8,7 +8,7 @@ exports[`Stats should have ids when ids is true 1`] = ` "main", ], "chunks": [ - "main", + "909", ], "emitted": true, "info": { @@ -32,7 +32,7 @@ exports[`Stats should have ids when ids is true 1`] = ` "files": [ "main.js", ], - "id": "main", + "id": "909", "initial": true, "names": [ "main", @@ -45,7 +45,7 @@ exports[`Stats should have ids when ids is true 1`] = ` "modules": [ { "chunks": [ - "main", + "909", ], "id": "585", "identifier": "/tests/fixtures/a.js", @@ -71,7 +71,7 @@ exports[`Stats should have stats 1`] = ` "main", ], "chunks": [ - "main", + "909", ], "emitted": true, "info": { @@ -97,13 +97,13 @@ exports[`Stats should have stats 1`] = ` "files": [ "main.js", ], - "id": "main", + "id": "909", "initial": true, "modules": [ { "assets": [], "chunks": [ - "main", + "909", ], "id": "585", "identifier": "/tests/fixtures/a.js", @@ -150,7 +150,7 @@ exports[`Stats should have stats 1`] = ` ], "assetsSize": 211, "chunks": [ - "main", + "909", ], "name": "main", }, @@ -158,13 +158,13 @@ exports[`Stats should have stats 1`] = ` "errors": [], "errorsCount": 0, "filteredModules": undefined, - "hash": "a62f45ec3d75aa689fa1", + "hash": "57e46af248a1c1fe076f", "logging": {}, "modules": [ { "assets": [], "chunks": [ - "main", + "909", ], "id": "585", "identifier": "/tests/fixtures/a.js", @@ -202,7 +202,7 @@ exports[`Stats should have stats 1`] = ` ], "assetsSize": 211, "chunks": [ - "main", + "909", ], "name": "main", }, @@ -222,7 +222,7 @@ exports[`Stats should output stats with query 1`] = ` "main", ], "chunks": [ - "main", + "909", ], "emitted": true, "info": { @@ -248,13 +248,13 @@ exports[`Stats should output stats with query 1`] = ` "files": [ "main.js", ], - "id": "main", + "id": "909", "initial": true, "modules": [ { "assets": [], "chunks": [ - "main", + "909", ], "id": "585", "identifier": "/tests/fixtures/a.js", @@ -295,7 +295,7 @@ exports[`Stats should output stats with query 1`] = ` { "assets": [], "chunks": [ - "main", + "909", ], "id": "958", "identifier": "/tests/fixtures/a.js?a=1", @@ -331,7 +331,7 @@ exports[`Stats should output stats with query 1`] = ` { "assets": [], "chunks": [ - "main", + "909", ], "id": "432", "identifier": "/tests/fixtures/c.js?c=3", @@ -368,7 +368,7 @@ exports[`Stats should output stats with query 1`] = ` { "assets": [], "chunks": [ - "main", + "909", ], "id": "919", "identifier": "/tests/fixtures/abc-query.js", @@ -415,7 +415,7 @@ exports.c = require("./c?c=3"); ], "assetsSize": 386, "chunks": [ - "main", + "909", ], "name": "main", }, @@ -423,13 +423,13 @@ exports.c = require("./c?c=3"); "errors": [], "errorsCount": 0, "filteredModules": undefined, - "hash": "17fb2a59facde9aafd96", + "hash": "863c8adf2d7c24d82182", "logging": {}, "modules": [ { "assets": [], "chunks": [ - "main", + "909", ], "id": "585", "identifier": "/tests/fixtures/a.js", @@ -470,7 +470,7 @@ exports.c = require("./c?c=3"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "958", "identifier": "/tests/fixtures/a.js?a=1", @@ -506,7 +506,7 @@ exports.c = require("./c?c=3"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "432", "identifier": "/tests/fixtures/c.js?c=3", @@ -543,7 +543,7 @@ exports.c = require("./c?c=3"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "919", "identifier": "/tests/fixtures/abc-query.js", @@ -581,7 +581,7 @@ exports.c = require("./c?c=3"); ], "assetsSize": 386, "chunks": [ - "main", + "909", ], "name": "main", }, diff --git a/packages/rspack/tests/__snapshots__/StatsTestCases.test.ts.snap b/packages/rspack/tests/__snapshots__/StatsTestCases.test.ts.snap index d6087fb6bae..8a997b43902 100644 --- a/packages/rspack/tests/__snapshots__/StatsTestCases.test.ts.snap +++ b/packages/rspack/tests/__snapshots__/StatsTestCases.test.ts.snap @@ -8,7 +8,7 @@ exports[`StatsTestCases should print correct stats for auxiliary-files-test 1`] "main", ], "chunks": [ - "main", + "909", ], "emitted": true, "info": { @@ -25,7 +25,7 @@ exports[`StatsTestCases should print correct stats for auxiliary-files-test 1`] "main", ], "chunks": [ - "main", + "909", ], "emitted": true, "info": { @@ -54,13 +54,13 @@ exports[`StatsTestCases should print correct stats for auxiliary-files-test 1`] "files": [ "bundle.js", ], - "id": "main", + "id": "909", "initial": true, "modules": [ { "assets": [], "chunks": [ - "main", + "909", ], "id": "193", "identifier": "asset/resource|/tests/statsCases/auxiliary-files-test/raw.png", @@ -104,7 +104,7 @@ exports[`StatsTestCases should print correct stats for auxiliary-files-test 1`] { "assets": [], "chunks": [ - "main", + "909", ], "id": "10", "identifier": "/tests/statsCases/auxiliary-files-test/index.js", @@ -133,7 +133,7 @@ import rawModule from './raw.png'; { "assets": [], "chunks": [ - "main", + "909", ], "id": "151", "identifier": "/tests/statsCases/auxiliary-files-test/stringModule.js", @@ -183,7 +183,7 @@ import rawModule from './raw.png'; ], "assetsSize": 459, "chunks": [ - "main", + "909", ], "name": "main", }, @@ -191,13 +191,13 @@ import rawModule from './raw.png'; "errors": [], "errorsCount": 0, "filteredModules": undefined, - "hash": "d6dd2961487dd1281bc4", + "hash": "9670c403a43c0e34d38b", "logging": {}, "modules": [ { "assets": [], "chunks": [ - "main", + "909", ], "id": "193", "identifier": "asset/resource|/tests/statsCases/auxiliary-files-test/raw.png", @@ -241,7 +241,7 @@ import rawModule from './raw.png'; { "assets": [], "chunks": [ - "main", + "909", ], "id": "10", "identifier": "/tests/statsCases/auxiliary-files-test/index.js", @@ -270,7 +270,7 @@ import rawModule from './raw.png'; { "assets": [], "chunks": [ - "main", + "909", ], "id": "151", "identifier": "/tests/statsCases/auxiliary-files-test/stringModule.js", @@ -303,7 +303,7 @@ import rawModule from './raw.png'; { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/public_path", @@ -322,7 +322,7 @@ import rawModule from './raw.png'; { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/make_namespace_object", @@ -349,7 +349,7 @@ import rawModule from './raw.png'; ], "assetsSize": 459, "chunks": [ - "main", + "909", ], "name": "main", }, @@ -363,26 +363,26 @@ import rawModule from './raw.png'; exports[`StatsTestCases should print correct stats for auxiliary-files-test 2`] = ` "PublicPath: (none) -asset 220e6fb336d7b999e76d.png 7 bytes {main} [emitted] [from: raw.png] (name: main) -asset bundle.js 459 bytes {main} [emitted] (name: main) +asset 220e6fb336d7b999e76d.png 7 bytes {909} [emitted] [from: raw.png] (name: main) +asset bundle.js 459 bytes {909} [emitted] (name: main) Entrypoint main 459 bytes = bundle.js -chunk {main} bundle.js (main) [entry] - ./raw.png [193] {main} +chunk {909} bundle.js (main) [entry] + ./raw.png [193] {909} esm import ./raw.png [10] - ./index.js [10] {main} + ./index.js [10] {909} entry ./index - ./stringModule.js [151] {main} + ./stringModule.js [151] {909} esm import ./stringModule [10] -./raw.png [193] {main} +./raw.png [193] {909} esm import ./raw.png [10] -./index.js [10] {main} +./index.js [10] {909} entry ./index -./stringModule.js [151] {main} +./stringModule.js [151] {909} esm import ./stringModule [10] -webpack/runtime/public_path {main} -webpack/runtime/make_namespace_object {main} +webpack/runtime/public_path {909} +webpack/runtime/make_namespace_object {909} -Rspack compiled successfully (d6dd2961487dd1281bc4)" +Rspack compiled successfully (9670c403a43c0e34d38b)" `; exports[`StatsTestCases should print correct stats for filename 1`] = ` @@ -391,15 +391,15 @@ exports[`StatsTestCases should print correct stats for filename 1`] = ` { "chunkNames": [], "chunks": [ - "dynamic_js", + "521", ], "emitted": true, "info": { "development": false, "hotModuleReplacement": false, }, - "name": "dynamic_js.xxxx.js", - "size": 138, + "name": "521.xxxx.js", + "size": 131, "type": "asset", }, { @@ -407,21 +407,21 @@ exports[`StatsTestCases should print correct stats for filename 1`] = ` "main", ], "chunks": [ - "main", + "909", ], "emitted": true, "info": { "development": false, "hotModuleReplacement": false, }, - "name": "main.xxxx.js", - "size": 1081, + "name": "909.xxxx.js", + "size": 1073, "type": "asset", }, ], "assetsByChunkName": { "main": [ - "main.xxxx.js", + "909.xxxx.js", ], }, "children": [], @@ -431,15 +431,15 @@ exports[`StatsTestCases should print correct stats for filename 1`] = ` "children": [], "entry": false, "files": [ - "dynamic_js.xxxx.js", + "521.xxxx.js", ], - "id": "dynamic_js", + "id": "521", "initial": false, "modules": [ { "assets": [], "chunks": [ - "dynamic_js", + "521", ], "id": "345", "identifier": "/tests/statsCases/filename/dynamic.js", @@ -473,7 +473,7 @@ exports[`StatsTestCases should print correct stats for filename 1`] = ` ], "names": [], "parents": [ - "main", + "909", ], "siblings": [], "size": 32, @@ -482,19 +482,19 @@ exports[`StatsTestCases should print correct stats for filename 1`] = ` { "auxiliaryFiles": [], "children": [ - "dynamic_js", + "521", ], "entry": true, "files": [ - "main.xxxx.js", + "909.xxxx.js", ], - "id": "main", + "id": "909", "initial": true, "modules": [ { "assets": [], "chunks": [ - "main", + "909", ], "id": "10", "identifier": "/tests/statsCases/filename/index.js", @@ -533,13 +533,13 @@ exports[`StatsTestCases should print correct stats for filename 1`] = ` "main": { "assets": [ { - "name": "main.xxxx.js", - "size": 1081, + "name": "909.xxxx.js", + "size": 1073, }, ], - "assetsSize": 1081, + "assetsSize": 1073, "chunks": [ - "main", + "909", ], "name": "main", }, @@ -547,13 +547,13 @@ exports[`StatsTestCases should print correct stats for filename 1`] = ` "errors": [], "errorsCount": 0, "filteredModules": undefined, - "hash": "ccf0aa4014db24570448", + "hash": "1d12e9b7a2ca57ef7519", "logging": {}, "modules": [ { "assets": [], "chunks": [ - "main", + "909", ], "id": "10", "identifier": "/tests/statsCases/filename/index.js", @@ -581,7 +581,7 @@ exports[`StatsTestCases should print correct stats for filename 1`] = ` { "assets": [], "chunks": [ - "dynamic_js", + "521", ], "id": "345", "identifier": "/tests/statsCases/filename/dynamic.js", @@ -615,7 +615,7 @@ exports[`StatsTestCases should print correct stats for filename 1`] = ` { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/ensure_chunk", @@ -634,7 +634,7 @@ exports[`StatsTestCases should print correct stats for filename 1`] = ` { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/has_own_property", @@ -653,7 +653,7 @@ exports[`StatsTestCases should print correct stats for filename 1`] = ` { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/load_chunk_with_block", @@ -672,7 +672,7 @@ exports[`StatsTestCases should print correct stats for filename 1`] = ` { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/make_namespace_object", @@ -691,7 +691,7 @@ exports[`StatsTestCases should print correct stats for filename 1`] = ` { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/require_chunk_loading", @@ -710,7 +710,7 @@ exports[`StatsTestCases should print correct stats for filename 1`] = ` { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/define_property_getters", @@ -729,7 +729,7 @@ exports[`StatsTestCases should print correct stats for filename 1`] = ` { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/get_chunk_filename/javascript", @@ -750,13 +750,13 @@ exports[`StatsTestCases should print correct stats for filename 1`] = ` "main": { "assets": [ { - "name": "main.xxxx.js", - "size": 1081, + "name": "909.xxxx.js", + "size": 1073, }, ], - "assetsSize": 1081, + "assetsSize": 1073, "chunks": [ - "main", + "909", ], "name": "main", }, @@ -770,28 +770,28 @@ exports[`StatsTestCases should print correct stats for filename 1`] = ` exports[`StatsTestCases should print correct stats for filename 2`] = ` "PublicPath: (none) -asset dynamic_js.xxxx.js 138 bytes {dynamic_js} [emitted] -asset main.xxxx.js 1.06 KiB {main} [emitted] (name: main) -Entrypoint main 1.06 KiB = main.xxxx.js -chunk {dynamic_js} dynamic_js.xxxx.js <{main}> - ./dynamic.js [345] {dynamic_js} +asset 521.xxxx.js 131 bytes {521} [emitted] +asset 909.xxxx.js 1.05 KiB {909} [emitted] (name: main) +Entrypoint main 1.05 KiB = 909.xxxx.js +chunk {521} 521.xxxx.js <{909}> + ./dynamic.js [345] {521} dynamic import ./dynamic [10] -chunk {main} main.xxxx.js (main) >{dynamic_js}< [entry] - ./index.js [10] {main} +chunk {909} 909.xxxx.js (main) >{521}< [entry] + ./index.js [10] {909} entry ./index -./index.js [10] {main} +./index.js [10] {909} entry ./index -./dynamic.js [345] {dynamic_js} +./dynamic.js [345] {521} dynamic import ./dynamic [10] -webpack/runtime/ensure_chunk {main} -webpack/runtime/has_own_property {main} -webpack/runtime/load_chunk_with_block {main} -webpack/runtime/make_namespace_object {main} -webpack/runtime/require_chunk_loading {main} -webpack/runtime/define_property_getters {main} -webpack/runtime/get_chunk_filename/javascript {main} +webpack/runtime/ensure_chunk {909} +webpack/runtime/has_own_property {909} +webpack/runtime/load_chunk_with_block {909} +webpack/runtime/make_namespace_object {909} +webpack/runtime/require_chunk_loading {909} +webpack/runtime/define_property_getters {909} +webpack/runtime/get_chunk_filename/javascript {909} -Rspack compiled successfully (ccf0aa4014db24570448)" +Rspack compiled successfully (1d12e9b7a2ca57ef7519)" `; exports[`StatsTestCases should print correct stats for hot+production 1`] = ` @@ -802,7 +802,7 @@ exports[`StatsTestCases should print correct stats for hot+production 1`] = ` "main", ], "chunks": [ - "main", + "909", ], "emitted": true, "info": { @@ -810,7 +810,7 @@ exports[`StatsTestCases should print correct stats for hot+production 1`] = ` "hotModuleReplacement": false, }, "name": "bundle.js", - "size": 9109, + "size": 9108, "type": "asset", }, ], @@ -828,13 +828,13 @@ exports[`StatsTestCases should print correct stats for hot+production 1`] = ` "files": [ "bundle.js", ], - "id": "main", + "id": "909", "initial": true, "modules": [ { "assets": [], "chunks": [ - "main", + "909", ], "id": "10", "identifier": "/tests/statsCases/hot+production/index.js", @@ -874,12 +874,12 @@ exports[`StatsTestCases should print correct stats for hot+production 1`] = ` "assets": [ { "name": "bundle.js", - "size": 9109, + "size": 9108, }, ], - "assetsSize": 9109, + "assetsSize": 9108, "chunks": [ - "main", + "909", ], "name": "main", }, @@ -887,13 +887,13 @@ exports[`StatsTestCases should print correct stats for hot+production 1`] = ` "errors": [], "errorsCount": 0, "filteredModules": undefined, - "hash": "6eed24d98a02965a7721", + "hash": "5f9f75789352d7c6b706", "logging": {}, "modules": [ { "assets": [], "chunks": [ - "main", + "909", ], "id": "10", "identifier": "/tests/statsCases/hot+production/index.js", @@ -921,7 +921,7 @@ exports[`StatsTestCases should print correct stats for hot+production 1`] = ` { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/get_full_hash", @@ -940,7 +940,7 @@ exports[`StatsTestCases should print correct stats for hot+production 1`] = ` { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/has_own_property", @@ -959,7 +959,7 @@ exports[`StatsTestCases should print correct stats for hot+production 1`] = ` { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/require_chunk_loading", @@ -978,7 +978,7 @@ exports[`StatsTestCases should print correct stats for hot+production 1`] = ` { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/hot_module_replacement", @@ -997,7 +997,7 @@ exports[`StatsTestCases should print correct stats for hot+production 1`] = ` { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/get_chunk_update_filename", @@ -1016,7 +1016,7 @@ exports[`StatsTestCases should print correct stats for hot+production 1`] = ` { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/get_main_filename/update manifest", @@ -1038,12 +1038,12 @@ exports[`StatsTestCases should print correct stats for hot+production 1`] = ` "assets": [ { "name": "bundle.js", - "size": 9109, + "size": 9108, }, ], - "assetsSize": 9109, + "assetsSize": 9108, "chunks": [ - "main", + "909", ], "name": "main", }, @@ -1057,21 +1057,21 @@ exports[`StatsTestCases should print correct stats for hot+production 1`] = ` exports[`StatsTestCases should print correct stats for hot+production 2`] = ` "PublicPath: (none) -asset bundle.js 8.9 KiB {main} [emitted] (name: main) -Entrypoint main 8.9 KiB = bundle.js -chunk {main} bundle.js (main) [entry] - ./index.js [10] {main} +asset bundle.js 8.89 KiB {909} [emitted] (name: main) +Entrypoint main 8.89 KiB = bundle.js +chunk {909} bundle.js (main) [entry] + ./index.js [10] {909} entry ./index.js -./index.js [10] {main} +./index.js [10] {909} entry ./index.js -webpack/runtime/get_full_hash {main} -webpack/runtime/has_own_property {main} -webpack/runtime/require_chunk_loading {main} -webpack/runtime/hot_module_replacement {main} -webpack/runtime/get_chunk_update_filename {main} -webpack/runtime/get_main_filename/update manifest {main} +webpack/runtime/get_full_hash {909} +webpack/runtime/has_own_property {909} +webpack/runtime/require_chunk_loading {909} +webpack/runtime/hot_module_replacement {909} +webpack/runtime/get_chunk_update_filename {909} +webpack/runtime/get_main_filename/update manifest {909} -Rspack compiled successfully (6eed24d98a02965a7721)" +Rspack compiled successfully (5f9f75789352d7c6b706)" `; exports[`StatsTestCases should print correct stats for identifier-let-strict-mode 1`] = ` @@ -1292,7 +1292,7 @@ exports[`StatsTestCases should print correct stats for limit-chunk-count-plugin "main", ], "chunks": [ - "main", + "909", ], "emitted": true, "info": { @@ -1300,7 +1300,7 @@ exports[`StatsTestCases should print correct stats for limit-chunk-count-plugin "hotModuleReplacement": false, }, "name": "bundle1.js", - "size": 1493, + "size": 1490, "type": "asset", }, ], @@ -1314,19 +1314,19 @@ exports[`StatsTestCases should print correct stats for limit-chunk-count-plugin { "auxiliaryFiles": [], "children": [ - "main", + "909", ], "entry": true, "files": [ "bundle1.js", ], - "id": "main", + "id": "909", "initial": true, "modules": [ { "assets": [], "chunks": [ - "main", + "909", ], "id": "996", "identifier": "/tests/statsCases/limit-chunk-count-plugin/b.js", @@ -1360,7 +1360,7 @@ exports[`StatsTestCases should print correct stats for limit-chunk-count-plugin { "assets": [], "chunks": [ - "main", + "909", ], "id": "460", "identifier": "/tests/statsCases/limit-chunk-count-plugin/c.js", @@ -1395,7 +1395,7 @@ import("./e"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "767", "identifier": "/tests/statsCases/limit-chunk-count-plugin/d.js", @@ -1434,7 +1434,7 @@ import("./e"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "390", "identifier": "/tests/statsCases/limit-chunk-count-plugin/e.js", @@ -1473,7 +1473,7 @@ import("./e"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "10", "identifier": "/tests/statsCases/limit-chunk-count-plugin/index.js", @@ -1506,7 +1506,7 @@ import(/* webpackChunkName: "c" */ "./c"); "main", ], "parents": [ - "main", + "909", ], "siblings": [], "size": 219, @@ -1518,12 +1518,12 @@ import(/* webpackChunkName: "c" */ "./c"); "assets": [ { "name": "bundle1.js", - "size": 1493, + "size": 1490, }, ], - "assetsSize": 1493, + "assetsSize": 1490, "chunks": [ - "main", + "909", ], "name": "main", }, @@ -1531,13 +1531,13 @@ import(/* webpackChunkName: "c" */ "./c"); "errors": [], "errorsCount": 0, "filteredModules": undefined, - "hash": "6e5966ea5b430a83dcf2", + "hash": "d99c50766ca5ed7d6d2b", "logging": {}, "modules": [ { "assets": [], "chunks": [ - "main", + "909", ], "id": "996", "identifier": "/tests/statsCases/limit-chunk-count-plugin/b.js", @@ -1571,7 +1571,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "460", "identifier": "/tests/statsCases/limit-chunk-count-plugin/c.js", @@ -1606,7 +1606,7 @@ import("./e"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "767", "identifier": "/tests/statsCases/limit-chunk-count-plugin/d.js", @@ -1645,7 +1645,7 @@ import("./e"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "390", "identifier": "/tests/statsCases/limit-chunk-count-plugin/e.js", @@ -1684,7 +1684,7 @@ import("./e"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "10", "identifier": "/tests/statsCases/limit-chunk-count-plugin/index.js", @@ -1715,7 +1715,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/ensure_chunk", @@ -1734,7 +1734,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/has_own_property", @@ -1753,7 +1753,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/load_chunk_with_block", @@ -1772,7 +1772,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/make_namespace_object", @@ -1791,7 +1791,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/define_property_getters", @@ -1810,7 +1810,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/create_fake_namespace_object", @@ -1833,12 +1833,12 @@ import(/* webpackChunkName: "c" */ "./c"); "assets": [ { "name": "bundle1.js", - "size": 1493, + "size": 1490, }, ], - "assetsSize": 1493, + "assetsSize": 1490, "chunks": [ - "main", + "909", ], "name": "c", }, @@ -1846,12 +1846,12 @@ import(/* webpackChunkName: "c" */ "./c"); "assets": [ { "name": "bundle1.js", - "size": 1493, + "size": 1490, }, ], - "assetsSize": 1493, + "assetsSize": 1490, "chunks": [ - "main", + "909", ], "name": "main", }, @@ -1865,40 +1865,40 @@ import(/* webpackChunkName: "c" */ "./c"); "assets": [ { "chunkNames": [ - "main", + "c", ], "chunks": [ - "main", + "76", ], "emitted": true, "info": { "development": false, "hotModuleReplacement": false, }, - "name": "bundle2.js", - "size": 1635, + "name": "76.bundle2.js", + "size": 209, "type": "asset", }, { "chunkNames": [ - "c", + "main", ], "chunks": [ - "c", + "909", ], "emitted": true, "info": { "development": false, "hotModuleReplacement": false, }, - "name": "c.bundle2.js", - "size": 208, + "name": "bundle2.js", + "size": 1637, "type": "asset", }, ], "assetsByChunkName": { "c": [ - "c.bundle2.js", + "76.bundle2.js", ], "main": [ "bundle2.js", @@ -1909,19 +1909,19 @@ import(/* webpackChunkName: "c" */ "./c"); { "auxiliaryFiles": [], "children": [ - "c", + "76", ], "entry": false, "files": [ - "c.bundle2.js", + "76.bundle2.js", ], - "id": "c", + "id": "76", "initial": false, "modules": [ { "assets": [], "chunks": [ - "c", + "76", ], "id": "460", "identifier": "/tests/statsCases/limit-chunk-count-plugin/c.js", @@ -1956,7 +1956,7 @@ import("./e"); { "assets": [], "chunks": [ - "c", + "76", ], "id": "767", "identifier": "/tests/statsCases/limit-chunk-count-plugin/d.js", @@ -1995,7 +1995,7 @@ import("./e"); { "assets": [], "chunks": [ - "c", + "76", ], "id": "390", "identifier": "/tests/statsCases/limit-chunk-count-plugin/e.js", @@ -2036,8 +2036,8 @@ import("./e"); "c", ], "parents": [ - "c", - "main", + "76", + "909", ], "siblings": [], "size": 74, @@ -2046,19 +2046,19 @@ import("./e"); { "auxiliaryFiles": [], "children": [ - "c", + "76", ], "entry": true, "files": [ "bundle2.js", ], - "id": "main", + "id": "909", "initial": true, "modules": [ { "assets": [], "chunks": [ - "main", + "909", ], "id": "996", "identifier": "/tests/statsCases/limit-chunk-count-plugin/b.js", @@ -2092,7 +2092,7 @@ import("./e"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "10", "identifier": "/tests/statsCases/limit-chunk-count-plugin/index.js", @@ -2135,12 +2135,12 @@ import(/* webpackChunkName: "c" */ "./c"); "assets": [ { "name": "bundle2.js", - "size": 1635, + "size": 1637, }, ], - "assetsSize": 1635, + "assetsSize": 1637, "chunks": [ - "main", + "909", ], "name": "main", }, @@ -2148,13 +2148,13 @@ import(/* webpackChunkName: "c" */ "./c"); "errors": [], "errorsCount": 0, "filteredModules": undefined, - "hash": "5eb6e2cc950e8704fa55", + "hash": "0378ba1556940bee6678", "logging": {}, "modules": [ { "assets": [], "chunks": [ - "main", + "909", ], "id": "996", "identifier": "/tests/statsCases/limit-chunk-count-plugin/b.js", @@ -2188,7 +2188,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "c", + "76", ], "id": "460", "identifier": "/tests/statsCases/limit-chunk-count-plugin/c.js", @@ -2223,7 +2223,7 @@ import("./e"); { "assets": [], "chunks": [ - "c", + "76", ], "id": "767", "identifier": "/tests/statsCases/limit-chunk-count-plugin/d.js", @@ -2262,7 +2262,7 @@ import("./e"); { "assets": [], "chunks": [ - "c", + "76", ], "id": "390", "identifier": "/tests/statsCases/limit-chunk-count-plugin/e.js", @@ -2301,7 +2301,7 @@ import("./e"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "10", "identifier": "/tests/statsCases/limit-chunk-count-plugin/index.js", @@ -2332,7 +2332,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/ensure_chunk", @@ -2351,7 +2351,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/has_own_property", @@ -2370,7 +2370,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/load_chunk_with_block", @@ -2389,7 +2389,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/make_namespace_object", @@ -2408,7 +2408,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/require_chunk_loading", @@ -2427,7 +2427,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/define_property_getters", @@ -2446,7 +2446,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/create_fake_namespace_object", @@ -2465,7 +2465,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/get_chunk_filename/javascript", @@ -2487,13 +2487,13 @@ import(/* webpackChunkName: "c" */ "./c"); "c": { "assets": [ { - "name": "c.bundle2.js", - "size": 208, + "name": "76.bundle2.js", + "size": 209, }, ], - "assetsSize": 208, + "assetsSize": 209, "chunks": [ - "c", + "76", ], "name": "c", }, @@ -2501,12 +2501,12 @@ import(/* webpackChunkName: "c" */ "./c"); "assets": [ { "name": "bundle2.js", - "size": 1635, + "size": 1637, }, ], - "assetsSize": 1635, + "assetsSize": 1637, "chunks": [ - "main", + "909", ], "name": "main", }, @@ -2519,19 +2519,17 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [ { - "chunkNames": [ - "main", - ], + "chunkNames": [], "chunks": [ - "main", + "345", ], "emitted": true, "info": { "development": false, "hotModuleReplacement": false, }, - "name": "bundle3.js", - "size": 1651, + "name": "345.bundle3.js", + "size": 100, "type": "asset", }, { @@ -2539,35 +2537,37 @@ import(/* webpackChunkName: "c" */ "./c"); "c", ], "chunks": [ - "c", + "76", ], "emitted": true, "info": { "development": false, "hotModuleReplacement": false, }, - "name": "c.bundle3.js", - "size": 146, + "name": "76.bundle3.js", + "size": 147, "type": "asset", }, { - "chunkNames": [], + "chunkNames": [ + "main", + ], "chunks": [ - "d_js-e_js", + "909", ], "emitted": true, "info": { "development": false, "hotModuleReplacement": false, }, - "name": "d_js-e_js.bundle3.js", - "size": 106, + "name": "bundle3.js", + "size": 1639, "type": "asset", }, ], "assetsByChunkName": { "c": [ - "c.bundle3.js", + "76.bundle3.js", ], "main": [ "bundle3.js", @@ -2575,78 +2575,20 @@ import(/* webpackChunkName: "c" */ "./c"); }, "children": [], "chunks": [ - { - "auxiliaryFiles": [], - "children": [ - "d_js-e_js", - ], - "entry": false, - "files": [ - "c.bundle3.js", - ], - "id": "c", - "initial": false, - "modules": [ - { - "assets": [], - "chunks": [ - "c", - ], - "id": "460", - "identifier": "/tests/statsCases/limit-chunk-count-plugin/c.js", - "issuer": "/tests/statsCases/limit-chunk-count-plugin/index.js", - "issuerId": "10", - "issuerName": "./index.js", - "issuerPath": [ - { - "id": "10", - "identifier": "/tests/statsCases/limit-chunk-count-plugin/index.js", - "name": "./index.js", - }, - ], - "moduleType": "javascript/auto", - "name": "./c.js", - "nameForCondition": "/tests/statsCases/limit-chunk-count-plugin/c.js", - "reasons": [ - { - "moduleId": "10", - "moduleIdentifier": "/tests/statsCases/limit-chunk-count-plugin/index.js", - "moduleName": "./index.js", - "type": "dynamic import", - "userRequest": "./c", - }, - ], - "size": 30, - "source": "import("./d"); -import("./e"); -", - "type": "module", - }, - ], - "names": [ - "c", - ], - "parents": [ - "main", - ], - "siblings": [], - "size": 30, - "type": "chunk", - }, { "auxiliaryFiles": [], "children": [], "entry": false, "files": [ - "d_js-e_js.bundle3.js", + "345.bundle3.js", ], - "id": "d_js-e_js", + "id": "345", "initial": false, "modules": [ { "assets": [], "chunks": [ - "d_js-e_js", + "345", ], "id": "767", "identifier": "/tests/statsCases/limit-chunk-count-plugin/d.js", @@ -2685,7 +2627,7 @@ import("./e"); { "assets": [], "chunks": [ - "d_js-e_js", + "345", ], "id": "390", "identifier": "/tests/statsCases/limit-chunk-count-plugin/e.js", @@ -2724,7 +2666,7 @@ import("./e"); ], "names": [], "parents": [ - "c", + "76", ], "siblings": [], "size": 44, @@ -2733,19 +2675,77 @@ import("./e"); { "auxiliaryFiles": [], "children": [ + "345", + ], + "entry": false, + "files": [ + "76.bundle3.js", + ], + "id": "76", + "initial": false, + "modules": [ + { + "assets": [], + "chunks": [ + "76", + ], + "id": "460", + "identifier": "/tests/statsCases/limit-chunk-count-plugin/c.js", + "issuer": "/tests/statsCases/limit-chunk-count-plugin/index.js", + "issuerId": "10", + "issuerName": "./index.js", + "issuerPath": [ + { + "id": "10", + "identifier": "/tests/statsCases/limit-chunk-count-plugin/index.js", + "name": "./index.js", + }, + ], + "moduleType": "javascript/auto", + "name": "./c.js", + "nameForCondition": "/tests/statsCases/limit-chunk-count-plugin/c.js", + "reasons": [ + { + "moduleId": "10", + "moduleIdentifier": "/tests/statsCases/limit-chunk-count-plugin/index.js", + "moduleName": "./index.js", + "type": "dynamic import", + "userRequest": "./c", + }, + ], + "size": 30, + "source": "import("./d"); +import("./e"); +", + "type": "module", + }, + ], + "names": [ "c", ], + "parents": [ + "909", + ], + "siblings": [], + "size": 30, + "type": "chunk", + }, + { + "auxiliaryFiles": [], + "children": [ + "76", + ], "entry": true, "files": [ "bundle3.js", ], - "id": "main", + "id": "909", "initial": true, "modules": [ { "assets": [], "chunks": [ - "main", + "909", ], "id": "996", "identifier": "/tests/statsCases/limit-chunk-count-plugin/b.js", @@ -2779,7 +2779,7 @@ import("./e"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "10", "identifier": "/tests/statsCases/limit-chunk-count-plugin/index.js", @@ -2822,12 +2822,12 @@ import(/* webpackChunkName: "c" */ "./c"); "assets": [ { "name": "bundle3.js", - "size": 1651, + "size": 1639, }, ], - "assetsSize": 1651, + "assetsSize": 1639, "chunks": [ - "main", + "909", ], "name": "main", }, @@ -2835,13 +2835,13 @@ import(/* webpackChunkName: "c" */ "./c"); "errors": [], "errorsCount": 0, "filteredModules": undefined, - "hash": "6f4b77678c9322ad7332", + "hash": "3b4e841086119619e33b", "logging": {}, "modules": [ { "assets": [], "chunks": [ - "main", + "909", ], "id": "996", "identifier": "/tests/statsCases/limit-chunk-count-plugin/b.js", @@ -2875,7 +2875,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "c", + "76", ], "id": "460", "identifier": "/tests/statsCases/limit-chunk-count-plugin/c.js", @@ -2910,7 +2910,7 @@ import("./e"); { "assets": [], "chunks": [ - "d_js-e_js", + "345", ], "id": "767", "identifier": "/tests/statsCases/limit-chunk-count-plugin/d.js", @@ -2949,7 +2949,7 @@ import("./e"); { "assets": [], "chunks": [ - "d_js-e_js", + "345", ], "id": "390", "identifier": "/tests/statsCases/limit-chunk-count-plugin/e.js", @@ -2988,7 +2988,7 @@ import("./e"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "10", "identifier": "/tests/statsCases/limit-chunk-count-plugin/index.js", @@ -3019,7 +3019,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/ensure_chunk", @@ -3038,7 +3038,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/has_own_property", @@ -3057,7 +3057,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/load_chunk_with_block", @@ -3076,7 +3076,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/make_namespace_object", @@ -3095,7 +3095,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/require_chunk_loading", @@ -3114,7 +3114,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/define_property_getters", @@ -3133,7 +3133,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/create_fake_namespace_object", @@ -3152,7 +3152,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/get_chunk_filename/javascript", @@ -3174,13 +3174,13 @@ import(/* webpackChunkName: "c" */ "./c"); "c": { "assets": [ { - "name": "c.bundle3.js", - "size": 146, + "name": "76.bundle3.js", + "size": 147, }, ], - "assetsSize": 146, + "assetsSize": 147, "chunks": [ - "c", + "76", ], "name": "c", }, @@ -3188,12 +3188,12 @@ import(/* webpackChunkName: "c" */ "./c"); "assets": [ { "name": "bundle3.js", - "size": 1651, + "size": 1639, }, ], - "assetsSize": 1651, + "assetsSize": 1639, "chunks": [ - "main", + "909", ], "name": "main", }, @@ -3206,69 +3206,69 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [ { - "chunkNames": [ - "main", - ], + "chunkNames": [], "chunks": [ - "main", + "697", ], "emitted": true, "info": { "development": false, "hotModuleReplacement": false, }, - "name": "bundle4.js", - "size": 1641, + "name": "697.bundle4.js", + "size": 69, "type": "asset", }, { - "chunkNames": [ - "c", - ], + "chunkNames": [], "chunks": [ - "c", + "753", ], "emitted": true, "info": { "development": false, "hotModuleReplacement": false, }, - "name": "c.bundle4.js", - "size": 146, + "name": "753.bundle4.js", + "size": 69, "type": "asset", }, { - "chunkNames": [], + "chunkNames": [ + "c", + ], "chunks": [ - "d_js", + "76", ], "emitted": true, "info": { "development": false, "hotModuleReplacement": false, }, - "name": "d_js.bundle4.js", - "size": 70, + "name": "76.bundle4.js", + "size": 147, "type": "asset", }, { - "chunkNames": [], + "chunkNames": [ + "main", + ], "chunks": [ - "e_js", + "909", ], "emitted": true, "info": { "development": false, "hotModuleReplacement": false, }, - "name": "e_js.bundle4.js", - "size": 70, + "name": "bundle4.js", + "size": 1639, "type": "asset", }, ], "assetsByChunkName": { "c": [ - "c.bundle4.js", + "76.bundle4.js", ], "main": [ "bundle4.js", @@ -3278,61 +3278,60 @@ import(/* webpackChunkName: "c" */ "./c"); "chunks": [ { "auxiliaryFiles": [], - "children": [ - "d_js", - "e_js", - ], + "children": [], "entry": false, "files": [ - "c.bundle4.js", + "697.bundle4.js", ], - "id": "c", + "id": "697", "initial": false, "modules": [ { "assets": [], "chunks": [ - "c", + "697", ], - "id": "460", - "identifier": "/tests/statsCases/limit-chunk-count-plugin/c.js", - "issuer": "/tests/statsCases/limit-chunk-count-plugin/index.js", - "issuerId": "10", - "issuerName": "./index.js", + "id": "390", + "identifier": "/tests/statsCases/limit-chunk-count-plugin/e.js", + "issuer": "/tests/statsCases/limit-chunk-count-plugin/c.js", + "issuerId": "460", + "issuerName": "./c.js", "issuerPath": [ { "id": "10", "identifier": "/tests/statsCases/limit-chunk-count-plugin/index.js", "name": "./index.js", }, + { + "id": "460", + "identifier": "/tests/statsCases/limit-chunk-count-plugin/c.js", + "name": "./c.js", + }, ], "moduleType": "javascript/auto", - "name": "./c.js", - "nameForCondition": "/tests/statsCases/limit-chunk-count-plugin/c.js", + "name": "./e.js", + "nameForCondition": "/tests/statsCases/limit-chunk-count-plugin/e.js", "reasons": [ { - "moduleId": "10", - "moduleIdentifier": "/tests/statsCases/limit-chunk-count-plugin/index.js", - "moduleName": "./index.js", + "moduleId": "460", + "moduleIdentifier": "/tests/statsCases/limit-chunk-count-plugin/c.js", + "moduleName": "./c.js", "type": "dynamic import", - "userRequest": "./c", + "userRequest": "./e", }, ], - "size": 30, - "source": "import("./d"); -import("./e"); + "size": 22, + "source": "module.exports = "e"; ", "type": "module", }, ], - "names": [ - "c", - ], + "names": [], "parents": [ - "main", + "76", ], "siblings": [], - "size": 30, + "size": 22, "type": "chunk", }, { @@ -3340,15 +3339,15 @@ import("./e"); "children": [], "entry": false, "files": [ - "d_js.bundle4.js", + "753.bundle4.js", ], - "id": "d_js", + "id": "753", "initial": false, "modules": [ { "assets": [], "chunks": [ - "d_js", + "753", ], "id": "767", "identifier": "/tests/statsCases/limit-chunk-count-plugin/d.js", @@ -3387,7 +3386,7 @@ import("./e"); ], "names": [], "parents": [ - "c", + "76", ], "siblings": [], "size": 22, @@ -3395,78 +3394,79 @@ import("./e"); }, { "auxiliaryFiles": [], - "children": [], + "children": [ + "697", + "753", + ], "entry": false, "files": [ - "e_js.bundle4.js", + "76.bundle4.js", ], - "id": "e_js", + "id": "76", "initial": false, "modules": [ { "assets": [], "chunks": [ - "e_js", + "76", ], - "id": "390", - "identifier": "/tests/statsCases/limit-chunk-count-plugin/e.js", - "issuer": "/tests/statsCases/limit-chunk-count-plugin/c.js", - "issuerId": "460", - "issuerName": "./c.js", + "id": "460", + "identifier": "/tests/statsCases/limit-chunk-count-plugin/c.js", + "issuer": "/tests/statsCases/limit-chunk-count-plugin/index.js", + "issuerId": "10", + "issuerName": "./index.js", "issuerPath": [ { "id": "10", "identifier": "/tests/statsCases/limit-chunk-count-plugin/index.js", "name": "./index.js", }, - { - "id": "460", - "identifier": "/tests/statsCases/limit-chunk-count-plugin/c.js", - "name": "./c.js", - }, ], "moduleType": "javascript/auto", - "name": "./e.js", - "nameForCondition": "/tests/statsCases/limit-chunk-count-plugin/e.js", + "name": "./c.js", + "nameForCondition": "/tests/statsCases/limit-chunk-count-plugin/c.js", "reasons": [ { - "moduleId": "460", - "moduleIdentifier": "/tests/statsCases/limit-chunk-count-plugin/c.js", - "moduleName": "./c.js", + "moduleId": "10", + "moduleIdentifier": "/tests/statsCases/limit-chunk-count-plugin/index.js", + "moduleName": "./index.js", "type": "dynamic import", - "userRequest": "./e", + "userRequest": "./c", }, ], - "size": 22, - "source": "module.exports = "e"; + "size": 30, + "source": "import("./d"); +import("./e"); ", "type": "module", }, ], - "names": [], - "parents": [ + "names": [ "c", ], + "parents": [ + "909", + ], "siblings": [], - "size": 22, + "size": 30, "type": "chunk", }, { "auxiliaryFiles": [], "children": [ - "c", + "76", ], "entry": true, "files": [ "bundle4.js", ], - "id": "main", + "id": "909", "initial": true, "modules": [ { "assets": [], "chunks": [ - "main", + "909", ], "id": "996", "identifier": "/tests/statsCases/limit-chunk-count-plugin/b.js", @@ -3500,7 +3500,7 @@ import("./e"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "10", "identifier": "/tests/statsCases/limit-chunk-count-plugin/index.js", @@ -3543,12 +3543,12 @@ import(/* webpackChunkName: "c" */ "./c"); "assets": [ { "name": "bundle4.js", - "size": 1641, + "size": 1639, }, ], - "assetsSize": 1641, + "assetsSize": 1639, "chunks": [ - "main", + "909", ], "name": "main", }, @@ -3556,13 +3556,13 @@ import(/* webpackChunkName: "c" */ "./c"); "errors": [], "errorsCount": 0, "filteredModules": undefined, - "hash": "129bf5e45fb1496ecac4", + "hash": "d8e71d8318ba2a5aacaa", "logging": {}, "modules": [ { "assets": [], "chunks": [ - "main", + "909", ], "id": "996", "identifier": "/tests/statsCases/limit-chunk-count-plugin/b.js", @@ -3596,7 +3596,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "c", + "76", ], "id": "460", "identifier": "/tests/statsCases/limit-chunk-count-plugin/c.js", @@ -3631,7 +3631,7 @@ import("./e"); { "assets": [], "chunks": [ - "d_js", + "753", ], "id": "767", "identifier": "/tests/statsCases/limit-chunk-count-plugin/d.js", @@ -3670,7 +3670,7 @@ import("./e"); { "assets": [], "chunks": [ - "e_js", + "697", ], "id": "390", "identifier": "/tests/statsCases/limit-chunk-count-plugin/e.js", @@ -3709,7 +3709,7 @@ import("./e"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "10", "identifier": "/tests/statsCases/limit-chunk-count-plugin/index.js", @@ -3740,7 +3740,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/ensure_chunk", @@ -3759,7 +3759,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/has_own_property", @@ -3778,7 +3778,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/load_chunk_with_block", @@ -3797,7 +3797,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/make_namespace_object", @@ -3816,7 +3816,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/require_chunk_loading", @@ -3835,7 +3835,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/define_property_getters", @@ -3854,7 +3854,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/create_fake_namespace_object", @@ -3873,7 +3873,7 @@ import(/* webpackChunkName: "c" */ "./c"); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/get_chunk_filename/javascript", @@ -3895,13 +3895,13 @@ import(/* webpackChunkName: "c" */ "./c"); "c": { "assets": [ { - "name": "c.bundle4.js", - "size": 146, + "name": "76.bundle4.js", + "size": 147, }, ], - "assetsSize": 146, + "assetsSize": 147, "chunks": [ - "c", + "76", ], "name": "c", }, @@ -3909,12 +3909,12 @@ import(/* webpackChunkName: "c" */ "./c"); "assets": [ { "name": "bundle4.js", - "size": 1641, + "size": 1639, }, ], - "assetsSize": 1641, + "assetsSize": 1639, "chunks": [ - "main", + "909", ], "name": "main", }, @@ -3927,7 +3927,7 @@ import(/* webpackChunkName: "c" */ "./c"); ], "errors": [], "errorsCount": 0, - "hash": "6e5966ea5b430a83dcf25eb6e2cc950e8704fa556f4b77678c9322ad7332129bf5e45fb1496ecac4", + "hash": "d99c50766ca5ed7d6d2b0378ba1556940bee66783b4e841086119619e33bd8e71d8318ba2a5aacaa", "warnings": [], "warningsCount": 0, } @@ -3936,161 +3936,161 @@ import(/* webpackChunkName: "c" */ "./c"); exports[`StatsTestCases should print correct stats for limit-chunk-count-plugin 2`] = ` "1 chunks: PublicPath: (none) - asset bundle1.js 1.46 KiB {main} [emitted] (name: main) + asset bundle1.js 1.46 KiB {909} [emitted] (name: main) Entrypoint main 1.46 KiB = bundle1.js Chunk Group c 1.46 KiB = bundle1.js - chunk {main} bundle1.js (main) <{main}> >{main}< [entry] - ./b.js [996] {main} + chunk {909} bundle1.js (main) <{909}> >{909}< [entry] + ./b.js [996] {909} cjs require ./b [10] - ./c.js [460] {main} + ./c.js [460] {909} dynamic import ./c [10] - ./d.js [767] {main} + ./d.js [767] {909} dynamic import ./d [460] - ./e.js [390] {main} + ./e.js [390] {909} dynamic import ./e [460] - ./index.js [10] {main} + ./index.js [10] {909} entry ./index - ./b.js [996] {main} + ./b.js [996] {909} cjs require ./b [10] - ./c.js [460] {main} + ./c.js [460] {909} dynamic import ./c [10] - ./d.js [767] {main} + ./d.js [767] {909} dynamic import ./d [460] - ./e.js [390] {main} + ./e.js [390] {909} dynamic import ./e [460] - ./index.js [10] {main} + ./index.js [10] {909} entry ./index - webpack/runtime/ensure_chunk {main} - webpack/runtime/has_own_property {main} - webpack/runtime/load_chunk_with_block {main} - webpack/runtime/make_namespace_object {main} - webpack/runtime/define_property_getters {main} - webpack/runtime/create_fake_namespace_object {main} + webpack/runtime/ensure_chunk {909} + webpack/runtime/has_own_property {909} + webpack/runtime/load_chunk_with_block {909} + webpack/runtime/make_namespace_object {909} + webpack/runtime/define_property_getters {909} + webpack/runtime/create_fake_namespace_object {909} - 1 chunks compiled successfully (6e5966ea5b430a83dcf2) + 1 chunks compiled successfully (d99c50766ca5ed7d6d2b) 2 chunks: PublicPath: (none) - asset bundle2.js 1.6 KiB {main} [emitted] (name: main) - asset c.bundle2.js 208 bytes {c} [emitted] (name: c) + asset 76.bundle2.js 209 bytes {76} [emitted] (name: c) + asset bundle2.js 1.6 KiB {909} [emitted] (name: main) Entrypoint main 1.6 KiB = bundle2.js - Chunk Group c 208 bytes = c.bundle2.js - chunk {c} c.bundle2.js (c) <{c}> <{main}> >{c}< - ./c.js [460] {c} + Chunk Group c 209 bytes = 76.bundle2.js + chunk {76} 76.bundle2.js (c) <{76}> <{909}> >{76}< + ./c.js [460] {76} dynamic import ./c [10] - ./d.js [767] {c} + ./d.js [767] {76} dynamic import ./d [460] - ./e.js [390] {c} + ./e.js [390] {76} dynamic import ./e [460] - chunk {main} bundle2.js (main) >{c}< [entry] - ./b.js [996] {main} + chunk {909} bundle2.js (main) >{76}< [entry] + ./b.js [996] {909} cjs require ./b [10] - ./index.js [10] {main} + ./index.js [10] {909} entry ./index - ./b.js [996] {main} + ./b.js [996] {909} cjs require ./b [10] - ./c.js [460] {c} + ./c.js [460] {76} dynamic import ./c [10] - ./d.js [767] {c} + ./d.js [767] {76} dynamic import ./d [460] - ./e.js [390] {c} + ./e.js [390] {76} dynamic import ./e [460] - ./index.js [10] {main} + ./index.js [10] {909} entry ./index - webpack/runtime/ensure_chunk {main} - webpack/runtime/has_own_property {main} - webpack/runtime/load_chunk_with_block {main} - webpack/runtime/make_namespace_object {main} - webpack/runtime/require_chunk_loading {main} - webpack/runtime/define_property_getters {main} - webpack/runtime/create_fake_namespace_object {main} - webpack/runtime/get_chunk_filename/javascript {main} + webpack/runtime/ensure_chunk {909} + webpack/runtime/has_own_property {909} + webpack/runtime/load_chunk_with_block {909} + webpack/runtime/make_namespace_object {909} + webpack/runtime/require_chunk_loading {909} + webpack/runtime/define_property_getters {909} + webpack/runtime/create_fake_namespace_object {909} + webpack/runtime/get_chunk_filename/javascript {909} - 2 chunks compiled successfully (5eb6e2cc950e8704fa55) + 2 chunks compiled successfully (0378ba1556940bee6678) 3 chunks: PublicPath: (none) - asset bundle3.js 1.61 KiB {main} [emitted] (name: main) - asset c.bundle3.js 146 bytes {c} [emitted] (name: c) - asset d_js-e_js.bundle3.js 106 bytes {d_js-e_js} [emitted] - Entrypoint main 1.61 KiB = bundle3.js - Chunk Group c 146 bytes = c.bundle3.js - chunk {c} c.bundle3.js (c) <{main}> >{d_js-e_js}< - ./c.js [460] {c} - dynamic import ./c [10] - chunk {d_js-e_js} d_js-e_js.bundle3.js <{c}> - ./d.js [767] {d_js-e_js} + asset 345.bundle3.js 100 bytes {345} [emitted] + asset 76.bundle3.js 147 bytes {76} [emitted] (name: c) + asset bundle3.js 1.6 KiB {909} [emitted] (name: main) + Entrypoint main 1.6 KiB = bundle3.js + Chunk Group c 147 bytes = 76.bundle3.js + chunk {345} 345.bundle3.js <{76}> + ./d.js [767] {345} dynamic import ./d [460] - ./e.js [390] {d_js-e_js} + ./e.js [390] {345} dynamic import ./e [460] - chunk {main} bundle3.js (main) >{c}< [entry] - ./b.js [996] {main} + chunk {76} 76.bundle3.js (c) <{909}> >{345}< + ./c.js [460] {76} + dynamic import ./c [10] + chunk {909} bundle3.js (main) >{76}< [entry] + ./b.js [996] {909} cjs require ./b [10] - ./index.js [10] {main} + ./index.js [10] {909} entry ./index - ./b.js [996] {main} + ./b.js [996] {909} cjs require ./b [10] - ./c.js [460] {c} + ./c.js [460] {76} dynamic import ./c [10] - ./d.js [767] {d_js-e_js} + ./d.js [767] {345} dynamic import ./d [460] - ./e.js [390] {d_js-e_js} + ./e.js [390] {345} dynamic import ./e [460] - ./index.js [10] {main} + ./index.js [10] {909} entry ./index - webpack/runtime/ensure_chunk {main} - webpack/runtime/has_own_property {main} - webpack/runtime/load_chunk_with_block {main} - webpack/runtime/make_namespace_object {main} - webpack/runtime/require_chunk_loading {main} - webpack/runtime/define_property_getters {main} - webpack/runtime/create_fake_namespace_object {main} - webpack/runtime/get_chunk_filename/javascript {main} + webpack/runtime/ensure_chunk {909} + webpack/runtime/has_own_property {909} + webpack/runtime/load_chunk_with_block {909} + webpack/runtime/make_namespace_object {909} + webpack/runtime/require_chunk_loading {909} + webpack/runtime/define_property_getters {909} + webpack/runtime/create_fake_namespace_object {909} + webpack/runtime/get_chunk_filename/javascript {909} - 3 chunks compiled successfully (6f4b77678c9322ad7332) + 3 chunks compiled successfully (3b4e841086119619e33b) 4 chunks: PublicPath: (none) - asset bundle4.js 1.6 KiB {main} [emitted] (name: main) - asset c.bundle4.js 146 bytes {c} [emitted] (name: c) - asset d_js.bundle4.js 70 bytes {d_js} [emitted] - asset e_js.bundle4.js 70 bytes {e_js} [emitted] + asset 697.bundle4.js 69 bytes {697} [emitted] + asset 753.bundle4.js 69 bytes {753} [emitted] + asset 76.bundle4.js 147 bytes {76} [emitted] (name: c) + asset bundle4.js 1.6 KiB {909} [emitted] (name: main) Entrypoint main 1.6 KiB = bundle4.js - Chunk Group c 146 bytes = c.bundle4.js - chunk {c} c.bundle4.js (c) <{main}> >{d_js}< >{e_js}< - ./c.js [460] {c} - dynamic import ./c [10] - chunk {d_js} d_js.bundle4.js <{c}> - ./d.js [767] {d_js} - dynamic import ./d [460] - chunk {e_js} e_js.bundle4.js <{c}> - ./e.js [390] {e_js} + Chunk Group c 147 bytes = 76.bundle4.js + chunk {697} 697.bundle4.js <{76}> + ./e.js [390] {697} dynamic import ./e [460] - chunk {main} bundle4.js (main) >{c}< [entry] - ./b.js [996] {main} + chunk {753} 753.bundle4.js <{76}> + ./d.js [767] {753} + dynamic import ./d [460] + chunk {76} 76.bundle4.js (c) <{909}> >{697}< >{753}< + ./c.js [460] {76} + dynamic import ./c [10] + chunk {909} bundle4.js (main) >{76}< [entry] + ./b.js [996] {909} cjs require ./b [10] - ./index.js [10] {main} + ./index.js [10] {909} entry ./index - ./b.js [996] {main} + ./b.js [996] {909} cjs require ./b [10] - ./c.js [460] {c} + ./c.js [460] {76} dynamic import ./c [10] - ./d.js [767] {d_js} + ./d.js [767] {753} dynamic import ./d [460] - ./e.js [390] {e_js} + ./e.js [390] {697} dynamic import ./e [460] - ./index.js [10] {main} + ./index.js [10] {909} entry ./index - webpack/runtime/ensure_chunk {main} - webpack/runtime/has_own_property {main} - webpack/runtime/load_chunk_with_block {main} - webpack/runtime/make_namespace_object {main} - webpack/runtime/require_chunk_loading {main} - webpack/runtime/define_property_getters {main} - webpack/runtime/create_fake_namespace_object {main} - webpack/runtime/get_chunk_filename/javascript {main} + webpack/runtime/ensure_chunk {909} + webpack/runtime/has_own_property {909} + webpack/runtime/load_chunk_with_block {909} + webpack/runtime/make_namespace_object {909} + webpack/runtime/require_chunk_loading {909} + webpack/runtime/define_property_getters {909} + webpack/runtime/create_fake_namespace_object {909} + webpack/runtime/get_chunk_filename/javascript {909} - 4 chunks compiled successfully (129bf5e45fb1496ecac4)" + 4 chunks compiled successfully (d8e71d8318ba2a5aacaa)" `; exports[`StatsTestCases should print correct stats for loader-builtin-swc-plugin-warn 1`] = ` @@ -4223,12 +4223,12 @@ exports[`StatsTestCases should print correct stats for named-chunk-group 1`] = ` "assets": [ { "name": "bundle.js", - "size": 1062, + "size": 1057, }, ], - "assetsSize": 1062, + "assetsSize": 1057, "chunks": [ - "main", + "909", ], "name": "main", }, @@ -4237,13 +4237,13 @@ exports[`StatsTestCases should print correct stats for named-chunk-group 1`] = ` "cimanyd": { "assets": [ { - "name": "cimanyd.bundle.js", - "size": 135, + "name": "414.bundle.js", + "size": 131, }, ], - "assetsSize": 135, + "assetsSize": 131, "chunks": [ - "cimanyd", + "414", ], "name": "cimanyd", }, @@ -4251,12 +4251,12 @@ exports[`StatsTestCases should print correct stats for named-chunk-group 1`] = ` "assets": [ { "name": "bundle.js", - "size": 1062, + "size": 1057, }, ], - "assetsSize": 1062, + "assetsSize": 1057, "chunks": [ - "main", + "909", ], "name": "main", }, @@ -4265,8 +4265,8 @@ exports[`StatsTestCases should print correct stats for named-chunk-group 1`] = ` `; exports[`StatsTestCases should print correct stats for named-chunk-group 2`] = ` -"Entrypoint main 1.04 KiB = bundle.js -Chunk Group cimanyd 135 bytes = cimanyd.bundle.js" +"Entrypoint main 1.03 KiB = bundle.js +Chunk Group cimanyd 131 bytes = 414.bundle.js" `; exports[`StatsTestCases should print correct stats for normal-errors 1`] = ` @@ -5060,7 +5060,7 @@ exports[`StatsTestCases should print correct stats for resolve-overflow 1`] = ` "main", ], "chunks": [ - "main", + "909", ], "emitted": true, "info": { @@ -5086,13 +5086,13 @@ exports[`StatsTestCases should print correct stats for resolve-overflow 1`] = ` "files": [ "bundle.js", ], - "id": "main", + "id": "909", "initial": true, "modules": [ { "assets": [], "chunks": [ - "main", + "909", ], "id": "10", "identifier": "/tests/statsCases/resolve-overflow/index.js", @@ -5138,7 +5138,7 @@ console.log(a); ], "assetsSize": 586, "chunks": [ - "main", + "909", ], "name": "main", }, @@ -5168,13 +5168,13 @@ console.log(a); ], "errorsCount": 1, "filteredModules": undefined, - "hash": "9b0142d5848973ce25b9", + "hash": "bb78d23510df57cf1bd2", "logging": {}, "modules": [ { "assets": [], "chunks": [ - "main", + "909", ], "id": "10", "identifier": "/tests/statsCases/resolve-overflow/index.js", @@ -5203,7 +5203,7 @@ console.log(a); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/make_namespace_object", @@ -5230,7 +5230,7 @@ console.log(a); ], "assetsSize": 586, "chunks": [ - "main", + "909", ], "name": "main", }, @@ -5244,14 +5244,14 @@ console.log(a); exports[`StatsTestCases should print correct stats for resolve-overflow 2`] = ` "PublicPath: auto -asset bundle.js 586 bytes {main} [emitted] (name: main) +asset bundle.js 586 bytes {909} [emitted] (name: main) Entrypoint main 586 bytes = bundle.js -chunk {main} bundle.js (main) [entry] - ./index.js [10] {main} +chunk {909} bundle.js (main) [entry] + ./index.js [10] {909} entry ./index -./index.js [10] {main} +./index.js [10] {909} entry ./index -webpack/runtime/make_namespace_object {main} +webpack/runtime/make_namespace_object {909} ERROR in ./index.js × Resolve error @@ -5262,7 +5262,7 @@ ERROR in ./index.js × Resolve error 2 │ console.log(a); ╰──── -Rspack compiled with 1 error (9b0142d5848973ce25b9)" +Rspack compiled with 1 error (bb78d23510df57cf1bd2)" `; exports[`StatsTestCases should print correct stats for resolve-unexpected-exports-in-pkg 1`] = ` @@ -5273,7 +5273,7 @@ exports[`StatsTestCases should print correct stats for resolve-unexpected-export "main", ], "chunks": [ - "main", + "909", ], "emitted": true, "info": { @@ -5299,13 +5299,13 @@ exports[`StatsTestCases should print correct stats for resolve-unexpected-export "files": [ "bundle.js", ], - "id": "main", + "id": "909", "initial": true, "modules": [ { "assets": [], "chunks": [ - "main", + "909", ], "id": "10", "identifier": "/tests/statsCases/resolve-unexpected-exports-in-pkg/index.js", @@ -5351,7 +5351,7 @@ console.log(a); ], "assetsSize": 570, "chunks": [ - "main", + "909", ], "name": "main", }, @@ -5369,13 +5369,13 @@ console.log(a); ], "errorsCount": 1, "filteredModules": undefined, - "hash": "660067b0d769a99b766b", + "hash": "d522bd63336c0fb69e32", "logging": {}, "modules": [ { "assets": [], "chunks": [ - "main", + "909", ], "id": "10", "identifier": "/tests/statsCases/resolve-unexpected-exports-in-pkg/index.js", @@ -5404,7 +5404,7 @@ console.log(a); { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/make_namespace_object", @@ -5431,7 +5431,7 @@ console.log(a); ], "assetsSize": 570, "chunks": [ - "main", + "909", ], "name": "main", }, @@ -5445,19 +5445,19 @@ console.log(a); exports[`StatsTestCases should print correct stats for resolve-unexpected-exports-in-pkg 2`] = ` "PublicPath: (none) -asset bundle.js 570 bytes {main} [emitted] (name: main) +asset bundle.js 570 bytes {909} [emitted] (name: main) Entrypoint main 570 bytes = bundle.js -chunk {main} bundle.js (main) [entry] - ./index.js [10] {main} +chunk {909} bundle.js (main) [entry] + ./index.js [10] {909} entry ./index -./index.js [10] {main} +./index.js [10] {909} entry ./index -webpack/runtime/make_namespace_object {main} +webpack/runtime/make_namespace_object {909} ERROR in ./index.js × Export should be relative path and start with "./", but got ../../index.js -Rspack compiled with 1 error (660067b0d769a99b766b)" +Rspack compiled with 1 error (d522bd63336c0fb69e32)" `; exports[`StatsTestCases should print correct stats for runtime-modules 1`] = ` @@ -5527,7 +5527,7 @@ exports[`StatsTestCases should print correct stats for simple 1`] = ` "main", ], "chunks": [ - "main", + "909", ], "emitted": true, "info": { @@ -5553,13 +5553,13 @@ exports[`StatsTestCases should print correct stats for simple 1`] = ` "files": [ "bundle.js", ], - "id": "main", + "id": "909", "initial": true, "modules": [ { "assets": [], "chunks": [ - "main", + "909", ], "id": "10", "identifier": "/tests/statsCases/simple/index.js", @@ -5604,7 +5604,7 @@ exports[`StatsTestCases should print correct stats for simple 1`] = ` ], "assetsSize": 589, "chunks": [ - "main", + "909", ], "name": "main", }, @@ -5612,13 +5612,13 @@ exports[`StatsTestCases should print correct stats for simple 1`] = ` "errors": [], "errorsCount": 0, "filteredModules": undefined, - "hash": "6792d81f6cf29aa1172a", + "hash": "bc29ba38ac2c5652e3c7", "logging": {}, "modules": [ { "assets": [], "chunks": [ - "main", + "909", ], "id": "10", "identifier": "/tests/statsCases/simple/index.js", @@ -5646,7 +5646,7 @@ exports[`StatsTestCases should print correct stats for simple 1`] = ` { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/has_own_property", @@ -5665,7 +5665,7 @@ exports[`StatsTestCases should print correct stats for simple 1`] = ` { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/make_namespace_object", @@ -5684,7 +5684,7 @@ exports[`StatsTestCases should print correct stats for simple 1`] = ` { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/define_property_getters", @@ -5711,7 +5711,7 @@ exports[`StatsTestCases should print correct stats for simple 1`] = ` ], "assetsSize": 589, "chunks": [ - "main", + "909", ], "name": "main", }, @@ -5725,18 +5725,18 @@ exports[`StatsTestCases should print correct stats for simple 1`] = ` exports[`StatsTestCases should print correct stats for simple 2`] = ` "PublicPath: (none) -asset bundle.js 589 bytes {main} [emitted] (name: main) +asset bundle.js 589 bytes {909} [emitted] (name: main) Entrypoint main 589 bytes = bundle.js -chunk {main} bundle.js (main) [entry] - ./index.js [10] {main} +chunk {909} bundle.js (main) [entry] + ./index.js [10] {909} entry ./index -./index.js [10] {main} +./index.js [10] {909} entry ./index -webpack/runtime/has_own_property {main} -webpack/runtime/make_namespace_object {main} -webpack/runtime/define_property_getters {main} +webpack/runtime/has_own_property {909} +webpack/runtime/make_namespace_object {909} +webpack/runtime/define_property_getters {909} -Rspack compiled successfully (6792d81f6cf29aa1172a)" +Rspack compiled successfully (bc29ba38ac2c5652e3c7)" `; exports[`StatsTestCases should print correct stats for simple-module-source 1`] = ` @@ -5747,7 +5747,7 @@ exports[`StatsTestCases should print correct stats for simple-module-source 1`] "main", ], "chunks": [ - "main", + "909", ], "emitted": true, "info": { @@ -5773,13 +5773,13 @@ exports[`StatsTestCases should print correct stats for simple-module-source 1`] "files": [ "bundle.js", ], - "id": "main", + "id": "909", "initial": true, "modules": [ { "assets": [], "chunks": [ - "main", + "909", ], "id": "98", "identifier": "/tests/statsCases/simple-module-source/raw.png", @@ -5813,7 +5813,7 @@ exports[`StatsTestCases should print correct stats for simple-module-source 1`] { "assets": [], "chunks": [ - "main", + "909", ], "id": "10", "identifier": "/tests/statsCases/simple-module-source/index.js", @@ -5842,7 +5842,7 @@ import rawModule from './raw.png'; { "assets": [], "chunks": [ - "main", + "909", ], "id": "151", "identifier": "/tests/statsCases/simple-module-source/stringModule.js", @@ -5892,7 +5892,7 @@ import rawModule from './raw.png'; ], "assetsSize": 685, "chunks": [ - "main", + "909", ], "name": "main", }, @@ -5900,13 +5900,13 @@ import rawModule from './raw.png'; "errors": [], "errorsCount": 0, "filteredModules": undefined, - "hash": "6fa2c05c8bebcd46512b", + "hash": "e1950c5429563e58a76d", "logging": {}, "modules": [ { "assets": [], "chunks": [ - "main", + "909", ], "id": "98", "identifier": "/tests/statsCases/simple-module-source/raw.png", @@ -5940,7 +5940,7 @@ import rawModule from './raw.png'; { "assets": [], "chunks": [ - "main", + "909", ], "id": "10", "identifier": "/tests/statsCases/simple-module-source/index.js", @@ -5969,7 +5969,7 @@ import rawModule from './raw.png'; { "assets": [], "chunks": [ - "main", + "909", ], "id": "151", "identifier": "/tests/statsCases/simple-module-source/stringModule.js", @@ -6002,7 +6002,7 @@ import rawModule from './raw.png'; { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/has_own_property", @@ -6021,7 +6021,7 @@ import rawModule from './raw.png'; { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/make_namespace_object", @@ -6040,7 +6040,7 @@ import rawModule from './raw.png'; { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/define_property_getters", @@ -6059,7 +6059,7 @@ import rawModule from './raw.png'; { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/compat_get_default_export", @@ -6086,7 +6086,7 @@ import rawModule from './raw.png'; ], "assetsSize": 685, "chunks": [ - "main", + "909", ], "name": "main", }, @@ -6106,7 +6106,7 @@ runtime modules 4 modules ./raw.png ./index.js ./stringModule.js -Rspack compiled successfully (6fa2c05c8bebcd46512b)" +Rspack compiled successfully (e1950c5429563e58a76d)" `; exports[`StatsTestCases should print correct stats for stats-hooks 1`] = ` @@ -6117,7 +6117,7 @@ exports[`StatsTestCases should print correct stats for stats-hooks 1`] = ` "main", ], "chunks": [ - "main", + "909", ], "emitted": true, "info": { @@ -6144,13 +6144,13 @@ exports[`StatsTestCases should print correct stats for stats-hooks 1`] = ` "files": [ "bundle.js", ], - "id": "main", + "id": "909", "initial": true, "modules": [ { "assets": [], "chunks": [ - "main", + "909", ], "id": "10", "identifier": "/tests/statsCases/stats-hooks/index.js", @@ -6193,7 +6193,7 @@ exports[`StatsTestCases should print correct stats for stats-hooks 1`] = ` ], "assetsSize": 589, "chunks": [ - "main", + "909", ], "name": "main", }, @@ -6201,13 +6201,13 @@ exports[`StatsTestCases should print correct stats for stats-hooks 1`] = ` "errors": [], "errorsCount": 0, "filteredModules": undefined, - "hash": "6792d81f6cf29aa1172a", + "hash": "bc29ba38ac2c5652e3c7", "logging": {}, "modules": [ { "assets": [], "chunks": [ - "main", + "909", ], "id": "10", "identifier": "/tests/statsCases/stats-hooks/index.js", @@ -6233,7 +6233,7 @@ exports[`StatsTestCases should print correct stats for stats-hooks 1`] = ` { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/has_own_property", @@ -6251,7 +6251,7 @@ exports[`StatsTestCases should print correct stats for stats-hooks 1`] = ` { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/make_namespace_object", @@ -6269,7 +6269,7 @@ exports[`StatsTestCases should print correct stats for stats-hooks 1`] = ` { "assets": [], "chunks": [ - "main", + "909", ], "id": "", "identifier": "webpack/runtime/define_property_getters", @@ -6295,7 +6295,7 @@ exports[`StatsTestCases should print correct stats for stats-hooks 1`] = ` ], "assetsSize": 589, "chunks": [ - "main", + "909", ], "name": "main", }, @@ -6313,7 +6313,7 @@ asset bundle.js 589 bytes [emitted111] (name: main) [testA: aaaaaa] Entrypoint main 589 bytes = bundle.js runtime modules 3 modules ./index.js -Rspack compiled successfully (6792d81f6cf29aa1172a)" +Rspack compiled successfully (bc29ba38ac2c5652e3c7)" `; exports[`StatsTestCases should print correct stats for try-require--module 1`] = ` diff --git a/packages/rspack/tests/configCases/split-chunks-common/default/webpack.config.js b/packages/rspack/tests/configCases/split-chunks-common/default/webpack.config.js index 8d788d9174f..9ad869a101e 100644 --- a/packages/rspack/tests/configCases/split-chunks-common/default/webpack.config.js +++ b/packages/rspack/tests/configCases/split-chunks-common/default/webpack.config.js @@ -9,5 +9,8 @@ module.exports = { output: { filename: "[name].js" }, - optimization: {} + optimization: { + chunkIds: "named", + moduleIds: "named", + } }; diff --git a/webpack-test/configCases/entry/no-chunking/test.config.js b/webpack-test/configCases/entry/no-chunking/test.config.js index f762f8fa50e..bf1f440f49f 100644 --- a/webpack-test/configCases/entry/no-chunking/test.config.js +++ b/webpack-test/configCases/entry/no-chunking/test.config.js @@ -2,6 +2,6 @@ module.exports = { findBundle: function (i, options) { // should add "./async_js.js" and "./nested_js.js", webpack don't have these two, // but somehow it passes in webpack but failed in rspack - return ["./a.js", "./async_js.js", "./nested_js.js", "./b.js", "./c.js", "./runtime.js", "./d.js"]; + return ["./a.js", "./b.js", "./c.js", "./runtime.js", "./d.js"]; } }; diff --git a/webpack-test/configCases/entry/no-chunking/webpack.config.js b/webpack-test/configCases/entry/no-chunking/webpack.config.js index 4330ea6ab91..7658bc48e00 100644 --- a/webpack-test/configCases/entry/no-chunking/webpack.config.js +++ b/webpack-test/configCases/entry/no-chunking/webpack.config.js @@ -19,7 +19,7 @@ module.exports = { output: { filename: "[name].js" }, - target: "web", + target: "async-node", externals: { fs: "commonjs fs" },