Skip to content

Commit

Permalink
test: name in multi compiler mode
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait authored Aug 14, 2024
2 parents cb6ffaf + 04d70cd commit ddbea27
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/__snapshots__/StatsTestCases.basictest.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1812,6 +1812,18 @@ You may need an appropriate loader to handle this file type, currently no loader
webpack x.x.x compiled with 2 errors in X ms"
`;

exports[`StatsTestCases should print correct stats for name 1`] = `
"./app.js:
asset bundle1.js X bytes [emitted] (name: main)
./app.js X bytes [built] [code generated]
Xdir/name/app.js (webpack x.x.x) compiled successfully in X ms
./server.js:
asset bundle2.js X bytes [emitted] (name: main)
./server.js X bytes [built] [code generated]
Xdir/name/server.js (webpack x.x.x) compiled successfully in X ms"
`;

exports[`StatsTestCases should print correct stats for named-chunk-groups 1`] = `
"Chunk Group main X KiB = a-main.js
Chunk Group async-a X KiB = a-48.js X bytes a-async-a.js X bytes
Expand Down
Empty file added test/statsCases/name/app.js
Empty file.
Empty file added test/statsCases/name/server.js
Empty file.
19 changes: 19 additions & 0 deletions test/statsCases/name/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/** @type {import("../../../").Configuration[]} */
module.exports = [
{
name: require.resolve("./app.js"),
mode: "production",
entry: "./app.js",
output: {
filename: "bundle1.js"
}
},
{
name: require.resolve("./server.js"),
mode: "production",
entry: "./server.js",
output: {
filename: "bundle2.js"
}
}
];

0 comments on commit ddbea27

Please sign in to comment.