avoids trying to load middleware exluded by scriptExtensions
This commit is contained in:
parent
2746bf5bde
commit
f7108a7255
|
@ -346,6 +346,8 @@ function setupMiddleware(app, instructions) {
|
||||||
app.defineMiddlewarePhases(phases);
|
app.defineMiddlewarePhases(phases);
|
||||||
|
|
||||||
middleware.forEach(function(data) {
|
middleware.forEach(function(data) {
|
||||||
|
var middlewareUnexcluded = _.find(instructions.files.boot, function(o) { return o === data.sourceFile });
|
||||||
|
if (!middlewareUnexcluded){ return; }
|
||||||
debug('Configuring middleware %j%s', data.sourceFile,
|
debug('Configuring middleware %j%s', data.sourceFile,
|
||||||
data.fragment ? ('#' + data.fragment) : '');
|
data.fragment ? ('#' + data.fragment) : '');
|
||||||
var factory = requireNodeOrEsModule(data.sourceFile);
|
var factory = requireNodeOrEsModule(data.sourceFile);
|
||||||
|
|
Loading…
Reference in New Issue