Skip to content

Commit df453d7

Browse files
refactor(web): trim AssetManifest to the fields the pipeline reads
The manifest type is Solid's own contract, not a Vite-compat surface — non-Vite bundlers produce it too, and unknown fields on parsed JSON pass through structurally without being typed. Drop assets/dynamicImports (deliberately never consumed) and document preloads as the extension slot. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent bcc0242 commit df453d7

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

‎packages/web/src/server-mock.ts‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,20 @@ export type PreloadLink = {
2020
media?: string;
2121
};
2222

23-
/** Bundler-agnostic static asset graph compatible with Vite client manifests. */
23+
/**
24+
* Static asset graph consumed by the SSR pipeline. This is Solid's own
25+
* contract — a parsed Vite client manifest satisfies it structurally
26+
* (unknown fields pass through untyped), but any bundler integration can
27+
* produce it. Only these fields are ever read: `preloads` is Solid's
28+
* extension slot for explicit typed links the integration selects.
29+
*/
2430
export type AssetManifest = Record<
2531
string,
2632
{
2733
file: string;
2834
css?: string[];
29-
assets?: string[];
3035
isEntry?: boolean;
3136
imports?: string[];
32-
dynamicImports?: string[];
3337
preloads?: PreloadLink[];
3438
}
3539
> & { _base?: string };

‎packages/web/src/server.ts‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,20 @@ export type PreloadLink = {
7272
media?: string;
7373
};
7474

75-
/** Bundler-agnostic static asset graph compatible with Vite client manifests. */
75+
/**
76+
* Static asset graph consumed by the SSR pipeline. This is Solid's own
77+
* contract — a parsed Vite client manifest satisfies it structurally
78+
* (unknown fields pass through untyped), but any bundler integration can
79+
* produce it. Only these fields are ever read: `preloads` is Solid's
80+
* extension slot for explicit typed links the integration selects.
81+
*/
7682
export type AssetManifest = Record<
7783
string,
7884
{
7985
file: string;
8086
css?: string[];
81-
assets?: string[];
8287
isEntry?: boolean;
8388
imports?: string[];
84-
dynamicImports?: string[];
8589
preloads?: PreloadLink[];
8690
}
8791
> & { _base?: string };

0 commit comments

Comments
 (0)