Skip to content

Commit 4d9d79c

Browse files
committed
renamed enforce left/right to pre/post
1 parent cda34a1 commit 4d9d79c

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

lib/NormalModuleFactory.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,25 +136,25 @@ function NormalModuleFactory(context, resolvers, options) {
136136
issuer: contextInfo.issuer
137137
});
138138
var settings = {};
139-
var useLoadersRight = []; // ex post loaders
140-
var useLoaders = []; // ex loaders
141-
var useLoadersLeft = []; // ex pre loaders
139+
var useLoadersPost = [];
140+
var useLoaders = [];
141+
var useLoadersPre = [];
142142
result.forEach(function(r) {
143143
if(r.type === "use") {
144-
if(r.enforce === "right" && !noPostAutoLoaders && !noPrePostAutoLoaders)
145-
useLoadersRight.push(r.value);
146-
else if(r.enforce === "left" && !noPrePostAutoLoaders)
147-
useLoadersLeft.push(r.value);
144+
if(r.enforce === "post" && !noPostAutoLoaders && !noPrePostAutoLoaders)
145+
useLoadersPost.push(r.value);
146+
else if(r.enforce === "pre" && !noPrePostAutoLoaders)
147+
useLoadersPre.push(r.value);
148148
else if(!r.enforce && !noAutoLoaders && !noPrePostAutoLoaders)
149149
useLoaders.push(r.value);
150150
} else {
151151
settings[r.type] = r.value;
152152
}
153153
});
154154
async.parallel([
155-
_this.resolveRequestArray.bind(_this, contextInfo, _this.context, useLoadersLeft, _this.resolvers.loader),
155+
_this.resolveRequestArray.bind(_this, contextInfo, _this.context, useLoadersPost, _this.resolvers.loader),
156156
_this.resolveRequestArray.bind(_this, contextInfo, _this.context, useLoaders, _this.resolvers.loader),
157-
_this.resolveRequestArray.bind(_this, contextInfo, _this.context, useLoadersRight, _this.resolvers.loader)
157+
_this.resolveRequestArray.bind(_this, contextInfo, _this.context, useLoadersPre, _this.resolvers.loader)
158158
], function(err, results) {
159159
if(err) return callback(err);
160160
loaders = results[0].concat(loaders).concat(results[1]).concat(results[2]);

schemas/webpackOptionsSchema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,8 +491,8 @@
491491
"properties": {
492492
"enforce": {
493493
"enum": [
494-
"left",
495-
"right"
494+
"pre",
495+
"post"
496496
]
497497
},
498498
"exclude": {

0 commit comments

Comments
 (0)