Skip to content

Commit

Permalink
Load config earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
ascorbic committed Dec 23, 2024
1 parent b55a149 commit 6317113
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/astro/src/core/dev/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export default async function dev(inlineConfig: AstroInlineConfig): Promise<DevS
if (!store) {
store = new MutableDataStore();
}
await attachContentServerListeners(restart.container);

const config = globalContentConfigObserver.get();
if (config.status === 'error') {
Expand All @@ -110,6 +111,8 @@ export default async function dev(inlineConfig: AstroInlineConfig): Promise<DevS
});
contentLayer.watchContentConfig();
await contentLayer.sync();
} else {
logger.warn('content', 'Content config not loaded');
}

// Start listening to the port
Expand All @@ -131,7 +134,6 @@ export default async function dev(inlineConfig: AstroInlineConfig): Promise<DevS
logger.warn('SKIP_FORMAT', msg.fsStrictWarning());
}

await attachContentServerListeners(restart.container);

logger.info(null, green('watching for file changes...'));

Expand Down

0 comments on commit 6317113

Please sign in to comment.