Skip to content

Commit

Permalink
feat: try without normalizePath
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-lefebvre committed Aug 15, 2024
1 parent 9f7ddb6 commit fa0ec84
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/astro/src/core/sync/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fsMod, { existsSync } from 'node:fs';
import { performance } from 'node:perf_hooks';
import { dim } from 'kleur/colors';
import { type HMRPayload, createServer, normalizePath } from 'vite';
import { type HMRPayload, createServer } from 'vite';
import type { AstroConfig, AstroInlineConfig, AstroSettings } from '../../@types/astro.js';
import { CONTENT_TYPES_FILE, DATA_STORE_FILE } from '../../content/consts.js';
import { globalContentLayer } from '../../content/content-layer.js';
Expand Down Expand Up @@ -125,9 +125,7 @@ export async function syncInternal({
});
await contentLayer.sync();
settings.timer.end('Sync content layer');
} else if (
fs.existsSync(normalizePath(fileURLToPath(getContentPaths(settings.config, fs).contentDir)))
) {
} else if (fs.existsSync(fileURLToPath(getContentPaths(settings.config, fs).contentDir))) {
// 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
Expand Down

0 comments on commit fa0ec84

Please sign in to comment.