Skip to content

Commit 95096d6

Browse files
committed
bug fix when no require.e is in the bundle
1 parent f3012a4 commit 95096d6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/dependencies/AMDRequireDependency.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ AMDRequireDependency.Template = function AMDRequireDependencyTemplate() {};
1717

1818
AMDRequireDependency.Template.prototype.apply = function(dep, source, outputOptions, requestShortener) {
1919
var depBlock = dep.block;
20-
var chunkId = depBlock.chunk && depBlock.chunk.id;
20+
var chunkId = depBlock.chunk && !depBlock.chunk.entry && depBlock.chunk.id;
2121
if(depBlock.arrayRange && !depBlock.functionRange) {
2222
if(typeof chunkId === "number") {
2323
source.replace(depBlock.range[0], depBlock.arrayRange[0]-1,

lib/dependencies/RequireEnsureDependency.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ RequireEnsureDependency.Template.prototype.apply = function(dep, source, outputO
2323
if(outputOptions.pathinfo) comment = "/*! " + requestShortener.shorten(depBlock.chunkName) + " */ ";
2424
source.replace(depBlock.chunkNameRange[0], depBlock.chunkNameRange[1]-1, comment + "0");
2525
}
26-
if(depBlock.chunk && typeof depBlock.chunk.id === "number") {
26+
if(depBlock.chunk && !depBlock.chunk.entry && typeof depBlock.chunk.id === "number") {
2727
source.replace(depBlock.expr.callee.range[0], depBlock.expr.callee.range[1]-1, "require.e/*nsure*/");
2828
source.replace(depBlock.expr.arguments[0].range[0], depBlock.expr.arguments[0].range[1]-1, (depBlock.chunk.id) + "" + asComment(depBlock.chunkReason));
2929
} else {

0 commit comments

Comments
 (0)