From 02bea8cc18ab3d514eae85fc26f970e962fe689b Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 26 May 2021 07:30:44 +0200 Subject: [PATCH] fix(@angular-devkit/build-angular): hide stacktraces from dart-sass errors --- packages/angular_devkit/build_angular/src/sass/worker.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/sass/worker.ts b/packages/angular_devkit/build_angular/src/sass/worker.ts index ee44149065e1..dad48cde5341 100644 --- a/packages/angular_devkit/build_angular/src/sass/worker.ts +++ b/packages/angular_devkit/build_angular/src/sass/worker.ts @@ -79,6 +79,8 @@ parentPort.on('message', (message: RenderRequestMessage | InitMessage) => { parentPort?.postMessage({ id, result }); } catch (error) { - parentPort?.postMessage({ id, error }); + // Needed because V8 will only serialize the message and stack properties of an Error instance. + const { formatted, file, line, column, message, stack } = error; + parentPort?.postMessage({ id, error: { formatted, file, line, column, message, stack } }); } });