From d50e5097222bcdebc5327f4551b504b0c324960e 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 bc7e8b2f3..9b91b0a03 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.'); +}