@rangojs/router 0.0.0-experimental.preview.1774295612 → 0.0.0-experimental.preview.1774295854
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vite/index.js +1 -1
- package/package.json +1 -1
- package/src/browser/rsc-router.tsx +18 -8
package/dist/vite/index.js
CHANGED
|
@@ -1745,7 +1745,7 @@ import { resolve } from "node:path";
|
|
|
1745
1745
|
// package.json
|
|
1746
1746
|
var package_default = {
|
|
1747
1747
|
name: "@rangojs/router",
|
|
1748
|
-
version: "0.0.0-experimental.preview.
|
|
1748
|
+
version: "0.0.0-experimental.preview.1774295854",
|
|
1749
1749
|
description: "Django-inspired RSC router with composable URL patterns",
|
|
1750
1750
|
keywords: [
|
|
1751
1751
|
"react",
|
package/package.json
CHANGED
|
@@ -141,15 +141,25 @@ export async function initBrowserApp(
|
|
|
141
141
|
initialTheme,
|
|
142
142
|
} = options;
|
|
143
143
|
|
|
144
|
+
// Dev-only: create debug channel for SSR hydration.
|
|
145
|
+
// The debugId was injected into the bootstrap script by the SSR handler.
|
|
146
|
+
// By now the server is done writing — the relay has all debug data buffered.
|
|
147
|
+
// Creating the channel sends "ready" which triggers an immediate flush.
|
|
148
|
+
const ssrDebugId = (globalThis as any).__RANGO_DEBUG_ID__ as
|
|
149
|
+
| string
|
|
150
|
+
| undefined;
|
|
151
|
+
const ssrDebugChannel =
|
|
152
|
+
ssrDebugId && (import.meta as any).hot
|
|
153
|
+
? createClientDebugChannel(ssrDebugId)
|
|
154
|
+
: undefined;
|
|
155
|
+
|
|
144
156
|
// Load initial payload from SSR-injected __FLIGHT_DATA__
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
const initialPayload =
|
|
152
|
-
await deps.createFromReadableStream<RscPayload>(rscStream);
|
|
157
|
+
const initialPayload = await deps.createFromReadableStream<RscPayload>(
|
|
158
|
+
rscStream,
|
|
159
|
+
ssrDebugChannel
|
|
160
|
+
? { debugChannel: ssrDebugChannel, findSourceMapURL }
|
|
161
|
+
: undefined,
|
|
162
|
+
);
|
|
153
163
|
|
|
154
164
|
// Extract themeConfig and initialTheme from payload if not explicitly provided
|
|
155
165
|
// This allows virtual entries to work without importing the router
|