Skip to content

Commit e52b7b2

Browse files
committed
Resolve loaders from configuration relative to context instead of resource
1 parent 71f0945 commit e52b7b2

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

lib/NormalModuleFactory.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,18 +107,18 @@ function NormalModuleFactory(context, resolvers, parser, options) {
107107
return onDoneResolving();
108108
if(noAutoLoaders) {
109109
async.parallel([
110-
_this.resolveRequestArray.bind(_this, contextInfo, context, noPostAutoLoaders ? [] : _this.postLoaders.match(resourcePath), _this.resolvers.loader),
111-
_this.resolveRequestArray.bind(_this, contextInfo, context, _this.preLoaders.match(resourcePath), _this.resolvers.loader)
110+
_this.resolveRequestArray.bind(_this, contextInfo, _this.context, noPostAutoLoaders ? [] : _this.postLoaders.match(resourcePath), _this.resolvers.loader),
111+
_this.resolveRequestArray.bind(_this, contextInfo, _this.context, _this.preLoaders.match(resourcePath), _this.resolvers.loader)
112112
], function(err, results) {
113113
if(err) return callback(err);
114114
loaders = results[0].concat(loaders).concat(results[1]);
115115
onDoneResolving();
116116
});
117117
} else {
118118
async.parallel([
119-
_this.resolveRequestArray.bind(_this, contextInfo, context, noPostAutoLoaders ? [] : _this.postLoaders.match(resourcePath), _this.resolvers.loader),
120-
_this.resolveRequestArray.bind(_this, contextInfo, context, _this.loaders.match(resourcePath), _this.resolvers.loader),
121-
_this.resolveRequestArray.bind(_this, contextInfo, context, _this.preLoaders.match(resourcePath), _this.resolvers.loader)
119+
_this.resolveRequestArray.bind(_this, contextInfo, _this.context, noPostAutoLoaders ? [] : _this.postLoaders.match(resourcePath), _this.resolvers.loader),
120+
_this.resolveRequestArray.bind(_this, contextInfo, _this.context, _this.loaders.match(resourcePath), _this.resolvers.loader),
121+
_this.resolveRequestArray.bind(_this, contextInfo, _this.context, _this.preLoaders.match(resourcePath), _this.resolvers.loader)
122122
], function(err, results) {
123123
if(err) return callback(err);
124124
loaders = results[0].concat(loaders).concat(results[1]).concat(results[2]);

0 commit comments

Comments
 (0)