fix(bootstrap): show the boot error shell when the app graph fails to evaluate (09-03)
A module that threw while evaluating stopped main.tsx before boot() ran, so the static loading shell stayed up. The entry now imports the app (boot.tsx) dynamically and renders the shell on rejection; the shell reads boot messages without the feature catalog. The preload helper gets its own chunk so lazy chunks do not import the per-build entry, and the bundle budget counts the entry's dynamic imports as initial JS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
e215c849fb
commit
9c8a5f417a
@@ -2,12 +2,15 @@ type ViteManifestEntry = Readonly<{
|
||||
file: string;
|
||||
isEntry?: boolean;
|
||||
imports?: readonly string[];
|
||||
dynamicImports?: readonly string[];
|
||||
}>;
|
||||
|
||||
/**
|
||||
* Static imports of an entry are part of initial JavaScript. Every remaining
|
||||
* JavaScript output is governed by the lazy-chunk budget.
|
||||
*
|
||||
* Static imports of an entry are part of initial JavaScript, and so are the
|
||||
* chunks the entry itself imports dynamically: main.tsx only imports the
|
||||
* application graph that way so it can report a graph that fails to evaluate
|
||||
* (09-03). Every remaining JavaScript output is governed by the lazy-chunk
|
||||
* budget.
|
||||
*/
|
||||
export function classifyViteJavascript(
|
||||
manifest: Readonly<Record<string, ViteManifestEntry>>,
|
||||
@@ -31,6 +34,7 @@ export function classifyViteJavascript(
|
||||
}
|
||||
if (entry.file.endsWith(".js")) initialFiles.add(entry.file);
|
||||
pendingKeys.push(...(entry.imports ?? []));
|
||||
if (entry.isEntry) pendingKeys.push(...(entry.dynamicImports ?? []));
|
||||
}
|
||||
|
||||
const allJavaScript = new Set(
|
||||
|
||||
Reference in New Issue
Block a user