Skip to content

fix(build): fail the build when SSR rendering errors occur - #5382

Closed
btea wants to merge 1 commit into
vuejs:mainfrom
btea:fix/fail-build-on-ssr-errors
Closed

fix(build): fail the build when SSR rendering errors occur#5382
btea wants to merge 1 commit into
vuejs:mainfrom
btea:fix/fail-build-on-ssr-errors

Conversation

@btea

@btea btea commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Description

Refs: vitejs/vite#23201

Linked Issues

Additional Context


Tip

The author can publish a preview release by commenting /publish after creating the PR.

@btea

btea commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

/publish

@pkg-pr-new

pkg-pr-new Bot commented Aug 19, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/vitepress@5382

commit: be430bc

@brc-dd

brc-dd commented Aug 19, 2026

Copy link
Copy Markdown
Member

Use app.config.throwUnhandledErrorInProduction = true in enhanceApp instead. Wrap it in if (import.meta.env.SSR) { ... } if you want the behavior similar to your PR.

Adding it by default, the way you did in PR, will leave no way for users to handle those errors if they wanted to suppress them or handle them differently.

If we want to be strict we can enable it in SSR by default, but that should be done before the enhanceApp call, so that it can still be disabled.

@brc-dd brc-dd closed this Aug 19, 2026
@btea
btea deleted the fix/fail-build-on-ssr-errors branch August 19, 2026 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants