소스 검색

Merge pull request #457 from sharelatex/as-silent-webpack-exit

Exit webpack without error if no entry points found
James Allen 8 년 전
부모
커밋
28aef4e72b
1개의 변경된 파일과 6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      services/web/webpack.config.js

+ 6 - 0
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