Skip to content

Commit

Permalink
Skip clean SSR output if page generation fails (#4526)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Aug 29, 2022
1 parent 2d2e38e commit 046bfd9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/nine-beans-divide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Skip clean SSR output if page generation fails
7 changes: 2 additions & 5 deletions packages/astro/src/core/build/static-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,8 @@ Example:

timer.generate = performance.now();
if (astroConfig.output === 'static') {
try {
await generatePages(opts, internals);
} finally {
await cleanSsrOutput(opts);
}
await generatePages(opts, internals);
await cleanSsrOutput(opts);
} else {
// Inject the manifest
await injectManifest(opts, internals);
Expand Down

0 comments on commit 046bfd9

Please sign in to comment.