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
@@ -1,4 +1,8 @@
|
||||
import { formatMessage } from "../i18n/index.ts";
|
||||
import { BOOT_MESSAGES } from "../i18n/boot-messages.ts";
|
||||
|
||||
// 09-03. Read from the boot messages alone, not the i18n catalog: the shell
|
||||
// has to render when the installed feature graph failed to evaluate.
|
||||
const MESSAGES = BOOT_MESSAGES["ko-KR"];
|
||||
|
||||
export type BootErrorShellProps = Readonly<{
|
||||
kind?: string;
|
||||
@@ -19,35 +23,36 @@ export function BootErrorShell({
|
||||
}: BootErrorShellProps) {
|
||||
return (
|
||||
<main role="alert">
|
||||
<h1>{formatMessage("ko-KR", "boot.failure.title")}</h1>
|
||||
<h1>{MESSAGES["boot.failure.title"]}</h1>
|
||||
<dl>
|
||||
<dt>{formatMessage("ko-KR", "boot.field.error")}</dt>
|
||||
<dt>{MESSAGES["boot.field.error"]}</dt>
|
||||
<dd>{kind}</dd>
|
||||
<dt>{formatMessage("ko-KR", "boot.field.code")}</dt>
|
||||
<dt>{MESSAGES["boot.field.code"]}</dt>
|
||||
<dd>{code}</dd>
|
||||
{buildId && (
|
||||
<>
|
||||
<dt>{formatMessage("ko-KR", "boot.field.build")}</dt>
|
||||
<dt>{MESSAGES["boot.field.build"]}</dt>
|
||||
<dd>{buildId}</dd>
|
||||
</>
|
||||
)}
|
||||
{configSchemaVersion && (
|
||||
<>
|
||||
<dt>{formatMessage("ko-KR", "boot.field.configSchema")}</dt>
|
||||
<dt>{MESSAGES["boot.field.configSchema"]}</dt>
|
||||
<dd>{configSchemaVersion}</dd>
|
||||
</>
|
||||
)}
|
||||
{releaseId && (
|
||||
<>
|
||||
<dt>{formatMessage("ko-KR", "boot.field.release")}</dt>
|
||||
<dt>{MESSAGES["boot.field.release"]}</dt>
|
||||
<dd>{releaseId}</dd>
|
||||
</>
|
||||
)}
|
||||
</dl>
|
||||
<p>
|
||||
{formatMessage("ko-KR", "boot.supportReference", {
|
||||
reference: supportReference,
|
||||
})}
|
||||
{MESSAGES["boot.supportReference"].replace(
|
||||
"{reference}",
|
||||
() => supportReference,
|
||||
)}
|
||||
</p>
|
||||
</main>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user