Resolve loaders from configuration relative to context instead of resource

This commit is contained in:
Tobias Koppers 2016-01-11 20:13:06 +01:00
parent 71f0945a81
commit e52b7b2e4d
1 changed files with 5 additions and 5 deletions

View File

@ -107,8 +107,8 @@ function NormalModuleFactory(context, resolvers, parser, options) {
return onDoneResolving();
if(noAutoLoaders) {
async.parallel([
_this.resolveRequestArray.bind(_this, contextInfo, context, noPostAutoLoaders ? [] : _this.postLoaders.match(resourcePath), _this.resolvers.loader),
_this.resolveRequestArray.bind(_this, contextInfo, context, _this.preLoaders.match(resourcePath), _this.resolvers.loader)
_this.resolveRequestArray.bind(_this, contextInfo, _this.context, noPostAutoLoaders ? [] : _this.postLoaders.match(resourcePath), _this.resolvers.loader),
_this.resolveRequestArray.bind(_this, contextInfo, _this.context, _this.preLoaders.match(resourcePath), _this.resolvers.loader)
], function(err, results) {
if(err) return callback(err);
loaders = results[0].concat(loaders).concat(results[1]);
@ -116,9 +116,9 @@ function NormalModuleFactory(context, resolvers, parser, options) {
});
} else {
async.parallel([
_this.resolveRequestArray.bind(_this, contextInfo, context, noPostAutoLoaders ? [] : _this.postLoaders.match(resourcePath), _this.resolvers.loader),
_this.resolveRequestArray.bind(_this, contextInfo, context, _this.loaders.match(resourcePath), _this.resolvers.loader),
_this.resolveRequestArray.bind(_this, contextInfo, context, _this.preLoaders.match(resourcePath), _this.resolvers.loader)
_this.resolveRequestArray.bind(_this, contextInfo, _this.context, noPostAutoLoaders ? [] : _this.postLoaders.match(resourcePath), _this.resolvers.loader),
_this.resolveRequestArray.bind(_this, contextInfo, _this.context, _this.loaders.match(resourcePath), _this.resolvers.loader),
_this.resolveRequestArray.bind(_this, contextInfo, _this.context, _this.preLoaders.match(resourcePath), _this.resolvers.loader)
], function(err, results) {
if(err) return callback(err);
loaders = results[0].concat(loaders).concat(results[1]).concat(results[2]);