From c9e33f665e8236c80c57fd3aa06c289f3ead2abd Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Tue, 10 Sep 2019 17:15:38 +0900 Subject: [PATCH] Check if there is a built code (#5415) --- index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index bc7e8b2f3a..9b91b0a03e 100644 --- a/index.js +++ b/index.js @@ -1 +1,7 @@ -require('./built').default(); +const fs = require('fs'); + +if (fs.existsSync('./built')) { + require('./built').default(); +} else { + console.log('Built code is not found. Probably an error occurred during a build or you just forgot to build.'); +}