diff --git a/lib/core-server/src/build-static.ts b/lib/core-server/src/build-static.ts index 22083e06e8d0..402acb2dea05 100644 --- a/lib/core-server/src/build-static.ts +++ b/lib/core-server/src/build-static.ts @@ -221,7 +221,9 @@ export async function buildStatic({ packageJson, ...loadOptions }: LoadOptions) try { await buildStaticStandalone(options); } catch (error) { - logger.error(error); + if (error instanceof Error) { + logger.error(error.stack || error.message); + } const presets = loadAllPresets({ corePresets: [require.resolve('./presets/common-preset')],