Repository navigation
Add config option to disable lazy route discovery - #13451
Conversation
🦋 Changeset detectedLatest commit: 81ac2da The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
2470cb5 to
1766db9
Compare
| version: "", | ||
| }, | ||
| }; | ||
| let context = mockFrameworkContext(); |
There was a problem hiding this comment.
Added some helpers for these things so we can add new fields in one spot and not have to go around and touch all tests that mock out a context
| import { decodeViaTurboStream } from "../../lib/dom/ssr/single-fetch"; | ||
| import type { ServerBuild } from "../../lib/server-runtime/build"; | ||
| import { createRequestHandler } from "../../lib/server-runtime/server"; | ||
| import { mockServerBuild } from "./utils"; |
There was a problem hiding this comment.
Updated tests to use this existing utility which now includes the routeDiscovery config
| handleDocumentRequest?: HandleDocumentRequestFunction; | ||
| } = {} | ||
| ) { | ||
| ): ServerBuild { |
There was a problem hiding this comment.
Now strongly typed so we know we have all fields
| future: FutureConfig; | ||
| ssr: boolean; | ||
| isSpaMode: boolean; | ||
| export type WindowReactRouterContext = ServerHandoff & { |
There was a problem hiding this comment.
Now that we collapsed @remix-run/react and @remix-run/server-runtime we can share some of these types better. The window context is exactly the server handoff plus the state/stream stuff we append to it after the fact
| // The number of active deferred keys rendered on the server | ||
| a?: number; | ||
| dev?: { | ||
| port?: number; | ||
| hmrRuntime?: string; | ||
| }; |
There was a problem hiding this comment.
Unused in the repo. I believe a was from the defer implementation and I think the dev stuff was from the classic compiler?
| serverHandoffString: createServerHandoffString({ | ||
| basename: build.basename, | ||
| ...baseServerHandoff, | ||
| criticalCss, |
There was a problem hiding this comment.
criticalCss is the only thing we add to the handoff on the first render pass
| type ValidateShape<T, Shape> = | ||
| // If it extends T | ||
| T extends Shape | ||
| ? // and there are no leftover props after removing the base | ||
| Exclude<keyof T, keyof Shape> extends never | ||
| ? // we are good | ||
| T | ||
| : // otherwise it's either too many or too few props | ||
| never | ||
| : never; |
There was a problem hiding this comment.
No longer needed because state is never included in the handoff string now - that was leftover from pre-turbo-stream
|
🤖 Hello there, We just published version Thanks! |
|
🤖 Hello there, We just published version Thanks! |
Closes #12656
Closes #12767