fix(core): better error logging on SSR/dev failures + log stacktraces and error causes (#8872)

This commit is contained in:
Sébastien Lorber 2023-04-07 18:00:59 +01:00 committed by GitHub
parent 46d2aa231d
commit a9a5f89b9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 155 additions and 75 deletions

View file

@ -42,6 +42,11 @@ function getNextVersionName() {
*/
}
// Artificial way to crash the SSR rendering and test errors
// See website/_dogfooding/_pages tests/crashTest.tsx
// Test with: DOCUSAURUS_CRASH_TEST=true yarn build:website:fast
const crashTest = process.env.DOCUSAURUS_CRASH_TEST === 'true';
const isDev = process.env.NODE_ENV === 'development';
const isDeployPreview =
@ -139,6 +144,7 @@ const config = {
onBrokenMarkdownLinks: 'warn',
favicon: 'img/docusaurus.ico',
customFields: {
crashTest,
isDeployPreview,
description:
'An optimized site generator in React. Docusaurus helps you to move fast and write content. Build documentation websites, blogs, marketing pages, and more.',