Skip to content

Commit a04354e

Browse files
committed
refactor: change order of webpack stats logging and server setup
1 parent ec330bc commit a04354e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Diff for: bin/cmd.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,18 @@ program
2727
.action(function(cmd, options) {
2828
console.log("netlify-lambda: Starting server");
2929
var static = Boolean(program.static);
30-
var server = serve.listen(program.port || 9000, static, Number(program.timeout) || 10);
3130
if (static) return; // early terminate, don't build
3231
build.watch(cmd, program.config, function(err, stats) {
3332
if (err) {
3433
console.error(err);
3534
return;
3635
}
37-
36+
37+
console.log(stats.toString({ color: true }));
38+
var server = serve.listen(program.port || 9000, static, Number(program.timeout) || 10);
3839
stats.compilation.chunks.forEach(function(chunk) {
3940
server.clearCache(chunk.name);
4041
});
41-
42-
console.log(stats.toString({ color: true }));
4342
});
4443
});
4544

0 commit comments

Comments
 (0)