aboutsummaryrefslogtreecommitdiff
path: root/node_modules/enhanced-resolve/lib/TryNextPlugin.js
blob: e4c9f9c0f45aeab57abd56034c6013c6ab1786b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
	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);
	});
};