Skip to content

Commit be6f6d2

Browse files
feat: add universal IDs to client nodes
1 parent 3459122 commit be6f6d2

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

packages/kit/src/core/sync/write_client_manifest.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ export function write_client_manifest(kit, manifest_data, output, metadata) {
2929
);
3030
}
3131

32+
if (kit.tracing === 'client' || kit.tracing === true) {
33+
// we don't need to include these if tracing is disabled -- they make the manifest bigger
34+
declarations.push(`export const universal_id = ${s(node.universal)};`);
35+
}
36+
3237
if (node.component) {
3338
declarations.push(
3439
`export { default as component } from ${s(

packages/kit/src/types/internal.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ export interface CSRPageNode {
111111
load?: Load;
112112
trailingSlash?: TrailingSlash;
113113
};
114+
universal_id?: string;
114115
}
115116

116117
export type CSRPageNodeLoader = () => Promise<CSRPageNode>;

0 commit comments

Comments
 (0)