Skip to content

Commit ca0702b

Browse files
committed
free var injection should go before export and import
1 parent 92c4a31 commit ca0702b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/NormalModule.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ NormalModule.prototype.source = function(dependencyTemplates, outputOptions, req
267267
varExpressions.push(v.expression);
268268
});
269269
emitFunction();
270-
var start = block.range ? block.range[0] : -1;
270+
var start = block.range ? block.range[0] : -10;
271271
var end = block.range ? block.range[1] : _source.size();
272272
if(varStartCode) source.insert(start + 0.5, varStartCode);
273273
if(varEndCode) source.insert(end + 0.5, "\n/* WEBPACK VAR INJECTION */" + varEndCode);

0 commit comments

Comments
 (0)