mirror of https://github.com/webpack/webpack.git
Resolve loaders from configuration relative to context instead of resource
This commit is contained in:
parent
71f0945a81
commit
e52b7b2e4d
|
@ -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]);
|
||||
|
|
Loading…
Reference in New Issue