Skip to content

Commit 562fe2d

Browse files
committed
Change case of option node.buffer to node.Buffer
1 parent e436659 commit 562fe2d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/WebpackOptionsDefaulter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function WebpackOptionsDefaulter() {
4242
this.set("node.console", false);
4343
this.set("node.process", true);
4444
this.set("node.global", true);
45-
this.set("node.buffer", true);
45+
this.set("node.Buffer", true);
4646
this.set("node.__filename", "mock");
4747
this.set("node.__dirname", "mock");
4848

lib/node/NodeSourcePlugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ NodeSourcePlugin.prototype.apply = function(compiler) {
4242
return ModuleParserHelpers.addParsedVariable(this, "console", "require(" + JSON.stringify(getPathToModule("console", consoleType)) + ")");
4343
});
4444
}
45-
if(this.options.buffer) {
46-
var bufferType = this.options.buffer;
45+
if(this.options.Buffer) {
46+
var bufferType = this.options.Buffer;
4747
compiler.parser.plugin("expression Buffer", function(expr) {
4848
return ModuleParserHelpers.addParsedVariable(this, "Buffer", "require(" + JSON.stringify(getPathToModule("buffer", bufferType)) + ").Buffer");
4949
});

0 commit comments

Comments
 (0)