Skip to content

Commit b6f8f3b

Browse files
Enhance comments in getResolverManifestEntries function
Add comments to clarify sorting logic for resolver manifest entries.
1 parent 9d9144a commit b6f8f3b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎packages/start-plugin-core/src/start-compiler/server-fn-resolver-module.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ function getResolverManifestEntries(
1717
serverFnsById: Record<string, ServerFn>,
1818
): Array<ResolverManifestEntry> {
1919
return Object.entries(serverFnsById)
20+
// Sort entries by ID so that the generated manifest has a stable, deterministic order.
21+
// Non-deterministic ordering causes the compiled hash of the same source file to change
22+
// between builds, breaking content-addressed caching and reproducible deployments.
2023
.sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0))
2124
.map(([id, fn]) => ({
2225
id,

0 commit comments

Comments
 (0)