mirror of https://github.com/webpack/webpack.git
parent
85af275e93
commit
5ca01e92f4
|
|
@ -67,7 +67,7 @@ NodeSourcePlugin.prototype.apply = function(compiler) {
|
|||
var alias = {};
|
||||
Object.keys(nodeLibsBrowser).forEach(function(lib) {
|
||||
if(options[lib] !== false)
|
||||
alias[lib] = getPathToModule(lib, options[lib]);
|
||||
alias[lib + "$"] = getPathToModule(lib, options[lib]);
|
||||
});
|
||||
if(Object.keys(alias).length > 0) {
|
||||
compiler.resolvers.normal.apply(
|
||||
|
|
|
|||
|
|
@ -92,4 +92,8 @@ it("should provide a vm shim", function () {
|
|||
|
||||
it("should provide a zlib shim", function () {
|
||||
require("zlib").should.be.an.Object;
|
||||
});
|
||||
});
|
||||
|
||||
it("should provide a shim for a path in a build-in module", function () {
|
||||
require("process/in.js").should.be.eql("in process");
|
||||
});
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
module.exports = "in process";
|
||||
|
|
@ -0,0 +1 @@
|
|||
throw new Error("Should not be loaded");
|
||||
Loading…
Reference in New Issue