diff --git a/apps/www/src/lib/registry/registry.ts b/apps/www/src/lib/registry/registry.ts index 77a69b7b..e79e1a6e 100644 --- a/apps/www/src/lib/registry/registry.ts +++ b/apps/www/src/lib/registry/registry.ts @@ -36,6 +36,9 @@ async function crawlUI(rootPath: string) { withFileTypes: true, }) + // Sort to ensure consistent order across platforms + dir.sort() + const uiRegistry: Registry = [] for (const dirent of dir) { @@ -59,6 +62,9 @@ async function crawlExample(rootPath: string) { withFileTypes: true, }) + // Sort to ensure consistent order across platforms + dir.sort() + const exampleRegistry: Registry = [] for (const dirent of dir) { @@ -99,6 +105,8 @@ async function buildUIRegistry(componentPath: string, componentName: string) { const dir = await readdir(componentPath, { withFileTypes: true, }) + // Sort to ensure consistent order across platforms + dir.sort() const files: string[] = [] const dependencies = new Set()