wallet-core/node_modules/enhanced-resolve/lib/TryNextPlugin.js
2017-05-03 15:35:00 +02:00

19 lines
509 B
JavaScript

/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
function TryNextPlugin(source, message, target) {
this.source = source;
this.message = message;
this.target = target;
}
module.exports = TryNextPlugin;
TryNextPlugin.prototype.apply = function(resolver) {
var target = this.target;
var message = this.message;
resolver.plugin(this.source, function(request, callback) {
resolver.doResolve(target, request, message, callback);
});
};