Skip to content
This repository was archived by the owner on Sep 12, 2019. It is now read-only.

Commit c8a7d81

Browse files
author
sw-yx
committed
silence function adding log
1 parent 00ca633 commit c8a7d81

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/utils/serve-functions.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,13 @@ function createHandler(dir) {
8181
Object.keys(functions).forEach(name => {
8282
const fn = functions[name];
8383
const clearCache = action => () => {
84-
console.log(
85-
`${NETLIFYDEVLOG} function ${chalk.yellow(
86-
name
87-
)} ${action}, reloading...`
88-
); // eslint-disable-line no-console
84+
if (action !== "added") {
85+
console.log(
86+
`${NETLIFYDEVLOG} function ${chalk.yellow(
87+
name
88+
)} ${action}, reloading...`
89+
); // eslint-disable-line no-console
90+
}
8991
const before = module.paths;
9092
module.paths = [fn.moduleDir];
9193
delete require.cache[require.resolve(fn.functionPath)];

0 commit comments

Comments
 (0)