From 7520174288df2626842862d96f3ce5185acd763f Mon Sep 17 00:00:00 2001 From: Alasdair Smith Date: Tue, 27 Mar 2018 12:30:40 +0100 Subject: [PATCH] Silently exit webpack process if no entry points are found in src or modules This better supports the community edition which currently has no code or modules that match and throws an error. --- services/web/webpack.config.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/services/web/webpack.config.js b/services/web/webpack.config.js index 4fc924b489..50dc47efb4 100644 --- a/services/web/webpack.config.js +++ b/services/web/webpack.config.js @@ -15,6 +15,12 @@ if (fs.existsSync(MODULES_PATH)) { }, entryPoints) } +// If no entry points are found, silently exit +if (!Object.keys(entryPoints).length) { + console.warn('No entry points found, exiting') + process.exit(0) +} + module.exports = { // Defines the "entry point(s)" for the application - i.e. the file which // bootstraps the application