Skip to content

Commit dbb09b4

Browse files
committed
prefer files over directory indicies #374
1 parent 4d18f58 commit dbb09b4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/Server.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,11 @@ function Server(compiler, options) {
198198
var contentBase = options.contentBase || process.cwd();
199199

200200
if(Array.isArray(contentBase)) {
201-
contentBase.forEach(function(item, index, array) {
202-
app.get("*", express.static(item), serveIndex(item));
201+
contentBase.forEach(function(item) {
202+
app.get("*", express.static(item));
203+
});
204+
contentBase.forEach(function(item) {
205+
app.get("*", serveIndex(item));
203206
});
204207
} else if(typeof contentBase === "object") {
205208
console.log('Using contentBase as a proxy is deprecated and will be removed in the next major version. Please use the proxy option instead.\n\nTo update remove the contentBase option from webpack.config.js and add this:');

0 commit comments

Comments
 (0)