diff --git a/lib/build.js b/lib/build.js index 764dad09..66ec33fd 100644 --- a/lib/build.js +++ b/lib/build.js @@ -82,6 +82,17 @@ function webpackConfig(dir, additionalConfig) { webpackConfig.entry[name] = "./" + file; } }); + if (Object.keys(webpackConfig.entry) < 1) { + console.warn( + ` + ---Start netlify-lambda notification--- + WARNING: No valid single functions files (ending in .mjs, .js or .ts) were found. + This could be because you have nested them in a folder. + If this is expected (e.g. you have a zipped function built somewhere else), you may ignore this. + ---End netlify-lambda notification--- + ` + ); + } if (additionalConfig) { var webpackAdditional = require(path.join(process.cwd(), additionalConfig));