Skip to content

Commit ddbea27

Browse files
test: name in multi compiler mode
2 parents cb6ffaf + 04d70cd commit ddbea27

File tree

4 files changed

+31
-0
lines changed

4 files changed

+31
-0
lines changed

test/__snapshots__/StatsTestCases.basictest.js.snap

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1812,6 +1812,18 @@ You may need an appropriate loader to handle this file type, currently no loader
18121812
webpack x.x.x compiled with 2 errors in X ms"
18131813
`;
18141814

1815+
exports[`StatsTestCases should print correct stats for name 1`] = `
1816+
"./app.js:
1817+
asset bundle1.js X bytes [emitted] (name: main)
1818+
./app.js X bytes [built] [code generated]
1819+
Xdir/name/app.js (webpack x.x.x) compiled successfully in X ms
1820+
1821+
./server.js:
1822+
asset bundle2.js X bytes [emitted] (name: main)
1823+
./server.js X bytes [built] [code generated]
1824+
Xdir/name/server.js (webpack x.x.x) compiled successfully in X ms"
1825+
`;
1826+
18151827
exports[`StatsTestCases should print correct stats for named-chunk-groups 1`] = `
18161828
"Chunk Group main X KiB = a-main.js
18171829
Chunk Group async-a X KiB = a-48.js X bytes a-async-a.js X bytes

test/statsCases/name/app.js

Whitespace-only changes.

test/statsCases/name/server.js

Whitespace-only changes.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/** @type {import("../../../").Configuration[]} */
2+
module.exports = [
3+
{
4+
name: require.resolve("./app.js"),
5+
mode: "production",
6+
entry: "./app.js",
7+
output: {
8+
filename: "bundle1.js"
9+
}
10+
},
11+
{
12+
name: require.resolve("./server.js"),
13+
mode: "production",
14+
entry: "./server.js",
15+
output: {
16+
filename: "bundle2.js"
17+
}
18+
}
19+
];

0 commit comments

Comments
 (0)