Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 6 additions & 4 deletions app/entry.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import i18n from "./localization/i18n" // your i18n configuration file
import i18nextOpts from "./localization/i18n.server"
import { resources } from "./localization/resource"

const ABORT_DELAY = 5000
// Reject all pending promises from handler functions after 10 seconds
export const streamTimeout = 10000

export default async function handleRequest(
request: Request,
Expand Down Expand Up @@ -38,7 +39,7 @@ export default async function handleRequest(

const { pipe, abort } = renderToPipeableStream(
<I18nextProvider i18n={instance}>
<ServerRouter abortDelay={ABORT_DELAY} context={context} url={request.url} />
<ServerRouter context={context} url={request.url} />
</I18nextProvider>,
{
[callbackName]: () => {
Expand Down Expand Up @@ -66,7 +67,8 @@ export default async function handleRequest(
},
}
)

setTimeout(abort, ABORT_DELAY)
// Abort the streaming render pass after 11 seconds so to allow the rejected
// boundaries to be flushed
setTimeout(abort, streamTimeout + 1000)
})
}
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"dependencies": {
"@forge42/seo-tools": "1.3.0",
"@react-router/node": "7.0.1",
"@react-router/node": "7.1.0",
"clsx": "2.1.1",
"hono": "4.6.12",
"i18next": "23.15.2",
Expand All @@ -39,8 +39,8 @@
"react": "19.0.0",
"react-dom": "19.0.0",
"react-i18next": "15.1.1",
"react-router": "7.0.1",
"react-router-hono-server": "2.0.0",
"react-router": "7.1.0",
"react-router-hono-server": "2.6.2",
"remix-hono": "0.0.16",
"remix-i18next": "7.0.0",
"tailwind-merge": "2.5.4",
Expand All @@ -50,8 +50,8 @@
"@babel/preset-typescript": "7.26.0",
"@biomejs/biome": "1.9.4",
"@dotenvx/dotenvx": "1.24.5",
"@react-router/dev": "7.0.1",
"@react-router/fs-routes": "7.0.1",
"@react-router/dev": "7.1.0",
"@react-router/fs-routes": "7.1.0",
"@testing-library/react": "16.0.1",
"@types/node": "22.9.1",
"@types/prompt": "1.1.9",
Expand Down
Loading
Loading