Fix JSON babel config error reporting (#7104)

Fix JSON babel config error reporting
This commit is contained in:
Norbert de Langen 2019-06-17 12:02:28 +02:00 committed by GitHub
commit 6389e30fce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,7 +41,7 @@ function loadFromPath(babelConfigPath) {
We tried both loading as JS & JSON, neither worked.
Maybe there's a syntax error in the file?`);
logger.error(`=> From JS loading we got: ${error.js.message}`);
logger.error(`=> From JSON loading we got: ${error.js.message}`);
logger.error(`=> From JSON loading we got: ${error.json && error.json.message}`);
throw error.js;
}