diff --git a/packages/platform-web/src/shuvi-app/react/view/ReactView.server.tsx b/packages/platform-web/src/shuvi-app/react/view/ReactView.server.tsx index bc40ccf82..0ab086a59 100644 --- a/packages/platform-web/src/shuvi-app/react/view/ReactView.server.tsx +++ b/packages/platform-web/src/shuvi-app/react/view/ReactView.server.tsx @@ -94,9 +94,9 @@ export class ReactServerView implements IReactServerView { SHUVI_SERVER_RENDER_TO_STRING.attrs.error.name, true ); - if (process.env.NODE_ENV === 'development') { - logger.error(error.stack); - } + + logger.error(error.stack); + setAppError(serializeServerError(error)); htmlContent = renderToString(RootApp); // Consistency on both server and client side } finally {