Skip to content

Commit

Permalink
fix: pass server island route to astro:build:done routes (#12907)
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-lefebvre authored Jan 6, 2025
1 parent 2d89492 commit dbf1275
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/metal-phones-cross.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fixes a regression around the server islands route, which was not passed to the adapters `astro:build:done` hook
4 changes: 3 additions & 1 deletion packages/astro/src/core/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { collectPagesData } from './page-data.js';
import { staticBuild, viteBuild } from './static-build.js';
import type { StaticBuildOptions } from './types.js';
import { getTimeStat } from './util.js';
import { getServerIslandRouteData } from '../server-islands/endpoint.js';

export interface BuildOptions {
/**
Expand Down Expand Up @@ -232,7 +233,8 @@ class AstroBuilder {
pages: pageNames,
routes: Object.values(allPages)
.flat()
.map((pageData) => pageData.route),
.map((pageData) => pageData.route)
.concat(hasServerIslands ? getServerIslandRouteData(this.settings.config) : []),
logging: this.logger,
});

Expand Down

0 comments on commit dbf1275

Please sign in to comment.