Skip to content

Commit a1dfd78

Browse files
committed
assign to require define require in current scope
1 parent 53c16c8 commit a1dfd78

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/dependencies/CommonJsPlugin.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ CommonJsPlugin.prototype.apply = function(compiler) {
5555
var dep = new ConstDependency("var require;", 0);
5656
dep.loc = expr.loc;
5757
this.state.current.addDependency(dep);
58+
this.scope.definitions.push("require");
5859
return true;
5960
});
6061
compiler.parser.plugin("rename require", function(expr) {

0 commit comments

Comments
 (0)