Skip to content

Commit bf70c88

Browse files
committed
throw on missing node.js module
fixes webpack#411
1 parent c745597 commit bf70c88

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/node/NodeSourcePlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ NodeSourcePlugin.prototype.apply = function(compiler) {
2020
return nodeLibsBrowser[module];
2121
} else if(type === "mock") {
2222
return require.resolve("node-libs-browser/mock/" + module);
23-
} else if(type === "empty" || type === undefined) {
23+
} else if(type === "empty") {
2424
return require.resolve("node-libs-browser/mock/empty");
2525
} else return module;
2626
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"memory-fs": "~0.1.0",
1414
"clone": "0.1.x",
1515
"webpack-core": "0.4.x",
16-
"node-libs-browser": "0.3.x",
16+
"node-libs-browser": "~0.3.1",
1717
"tapable": "~0.1.6"
1818
},
1919
"licenses": [

0 commit comments

Comments
 (0)