From 4997cb98473a3b5dcd3ff78220481f4054d9d88a Mon Sep 17 00:00:00 2001 From: Anton Nikolaev Date: Fri, 9 Apr 2021 05:15:14 -0700 Subject: [PATCH] Show file path and position when babel transformation failed Summary: Currently when babel transformation is failed, only stack is shown. It's better to log the whole error object because it also contains path and line number of the code failing to transpile. Reviewed By: passy Differential Revision: D27034942 fbshipit-source-id: 76e03871c924489e2698a26622e6bc6fdd305560 --- desktop/scripts/build-utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/scripts/build-utils.ts b/desktop/scripts/build-utils.ts index f5698b262..84c909eb2 100644 --- a/desktop/scripts/build-utils.ts +++ b/desktop/scripts/build-utils.ts @@ -54,7 +54,7 @@ const hardcodedPlugins = new Set([ ]); export function die(err: Error) { - console.error(err.stack); + console.error(err); process.exit(1); }