Skip to content

Commit 97780e1

Browse files
committed
Updates hash length tests to catch async chunk loading
1 parent c84bd70 commit 97780e1

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = "chunk";
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
it("should compile and run the test", function () {
2-
1+
it("should compile and run the test", function (done) {
2+
require(['./chunk'], function () {
3+
it("should load additional chunks", function () {});
4+
done();
5+
});
36
});

test/configCases/hash-length/output-filename/webpack.config.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ module.exports = [{
88
}
99
}, {
1010
output: {
11-
filename: 'bundle.[chunkhash:8].js'
11+
filename: 'bundle.[hash].js',
12+
chunkFilename: '[id].bundle.[hash:8].js'
1213
}
1314
}, {
1415
output: {
15-
filename: 'bundle.[chunkhash].js'
16+
filename: 'bundle.[hash:6].js',
17+
chunkFilename: '[id].bundle.[hash:8].js'
1618
}
1719
}];

0 commit comments

Comments
 (0)