Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions docs/start/framework/react/guide/server-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ You can customize function ID generation for the production build by providing a

Prefer deterministic inputs (filename + functionName) so IDs remain stable between builds.

Please note that this customization is **experimental** und subject to change.
Please note that this customization is **experimental** and subject to change.

Example:

Expand All @@ -256,12 +256,14 @@ export default defineConfig({
tanstackStart({
serverFns: {
generateFunctionId: ({ filename, functionName }) => {
// Return a custom ID string. If you return undefined, the default is used.
// Return a custom ID string
return crypto
.createHash('sha1')
.update(`${filename}--${functionName}`)
.digest('hex')
return undefined

// If you return undefined, the default is used
// return undefined
},
},
}),
Expand Down
Loading