[Babel] Log errors to stdout, not stderr
Writing to stderr causes buck to fail compilation.. which is not we want. Let's log to stdout only for now.
Sathya Gunasekaran committed
May 15, 2023 at 14:45 UTC
f57ed15a332b8963775351359153d8059c26d0ce
1 file changed
+3
-5
compiler/forget/src/Babel/BabelPlugin.ts
+3
-5
@@ -109,7 +109,7 @@ export default function ReactForgetBabelPlugin(
109
) {
110
throw err;
111
} else {
112
- console.error(formatErrorsForConsole(err, pass.filename ?? null));
112
+ console.log(formatErrorsForConsole(err, pass.filename ?? null));
113
}
114
} finally {
115
// We are generating a new FunctionDeclaration node, so we must skip over it or this
@@ -150,7 +150,7 @@ export default function ReactForgetBabelPlugin(
150
if (options.panicOnBailout || error.isCritical()) {
151
throw error;
152
} else {
153
- console.error(formatErrorsForConsole(error, pass.filename));
153
+ console.log(formatErrorsForConsole(error, pass.filename));
154
}
155
return;
156
}
@@ -219,9 +219,7 @@ export default function ReactForgetBabelPlugin(
219
if (options.panicOnBailout || error.isCritical()) {
220
throw error;
221
} else {
222
- console.error(
223
- formatErrorsForConsole(error, pass.filename ?? null)
224
- );
222
+ console.log(formatErrorsForConsole(error, pass.filename ?? null));
223
}
224
}
225