Skip to content

Commit e8206d0

Browse files
committed
no empty chunk loading function
1 parent d3a9712 commit e8206d0

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

lib/MainTemplate.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,7 @@ MainTemplate.prototype.renderModule = function(hash, chunk, varModuleId) {
114114

115115
MainTemplate.prototype.renderRequireExtensions = function(hash, chunk) {
116116
var buf = [];
117-
if(chunk.chunks.length == 0) {
118-
buf.push("// The bundle contains no chunks. A empty chunk loading function.");
119-
buf.push(this.requireFn + ".e = function requireEnsure(_, callback) {");
120-
buf.push(this.indent([
121-
"callback.call(null, this);"
122-
]));
123-
buf.push("};");
124-
} else {
117+
if(chunk.chunks.length > 0) {
125118
buf.push("// This file contains only the entry chunk.");
126119
buf.push("// The chunk loading function for additional chunks");
127120
buf.push(this.requireFn + ".e = function requireEnsure(chunkId, callback) {");

0 commit comments

Comments
 (0)