diff --git a/packages/astro/src/core/sync/index.ts b/packages/astro/src/core/sync/index.ts index 9a193502f518..9d9e5bc23703 100644 --- a/packages/astro/src/core/sync/index.ts +++ b/packages/astro/src/core/sync/index.ts @@ -124,7 +124,7 @@ export async function syncInternal({ }); await contentLayer.sync(); settings.timer.end('Sync content layer'); - } else if (fs.existsSync(getContentPaths(settings.config, fs).contentDir)) { + } else if (fs.existsSync(getContentPaths(settings.config, fs).contentDir.href)) { // Content is synced after writeFiles. That means references are not created // To work around it, we create a stub so the reference is created and content // sync will override the empty file