Skip to content

Commit 3096317

Browse files
committed
Feature: Disallow to load initial chunk on demand via throwing an error
1 parent 5edc7ef commit 3096317

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

lib/Compilation.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,8 +1031,7 @@ class Compilation extends Tapable {
10311031
if(c === undefined) {
10321032
c = this.namedChunks[b.chunkName];
10331033
if(c && c.isInitial()) {
1034-
// TODO webpack 4: convert this to an error
1035-
this.warnings.push(new AsyncDependencyToInitialChunkWarning(b.chunkName, b.module, b.loc));
1034+
this.errors.push(new AsyncDependencyToInitialChunkWarning(b.chunkName, b.module, b.loc));
10361035
c = chunk;
10371036
} else {
10381037
c = this.addChunk(b.chunkName, b.module, b.loc);

0 commit comments

Comments
 (0)