Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Jan 15, 2025
1 parent 9a41e56 commit ab9d953
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/astro/src/core/routing/manifest/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ export async function createRouteManifest(
// Ideally we would only inject the server islands route if server islands are used in the project.
// Unfortunately, there is a "circular dependency": to know if server islands are used, we need to run
// the build but the build relies on the routes manifest.
if (settings.adapter?.adapterFeatures?.buildOutput !== 'static') {
if (settings.adapter && settings.adapter.adapterFeatures?.buildOutput !== 'static') {
injectServerIslandRoute(settings.config, { routes });
}
await runHookRoutesResolved({ routes, settings, logger });
Expand Down
10 changes: 1 addition & 9 deletions packages/astro/test/units/routing/manifest.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,6 @@ describe('routing - createRouteManifest', () => {
});

assert.deepEqual(getManifestRoutes(manifest), [
{
route: '/_server-islands/[name]',
type: 'page',
},
{
route: '/_image',
type: 'endpoint',
Expand Down Expand Up @@ -314,10 +310,7 @@ describe('routing - createRouteManifest', () => {
});

assert.deepEqual(getManifestRoutes(manifest), [
{
route: '/_server-islands/[name]',
type: 'page',
},

{
route: '/_image',
type: 'endpoint',
Expand Down Expand Up @@ -457,7 +450,6 @@ describe('routing - createRouteManifest', () => {
});

assert.deepEqual(getManifestRoutes(manifest), [
{ type: 'page', route: '/_server-islands/[name]' },
{ type: 'endpoint', route: '/_image' },
{ type: 'endpoint', route: '/blog/a-[b].233' },
{ type: 'redirect', route: '/posts/a-[b].233' },
Expand Down

0 comments on commit ab9d953

Please sign in to comment.