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>
18 lines
738 B
TypeScript
18 lines
738 B
TypeScript
import "../presentation/styles/theme.css";
|
|
|
|
/**
|
|
* 09-03. The entry imports the application graph dynamically. A module in it
|
|
* that throws while it evaluates (a duplicate message key, a route or
|
|
* operation conflict) used to stop the entry before any handler ran, leaving
|
|
* the static loading shell up. Now it rejects this import and the failure is
|
|
* shown.
|
|
*
|
|
* The entry stays free of anything the application graph also imports (no
|
|
* JSX, no React): whatever it hosted, every chunk would import from it, and
|
|
* the entry's hash changes with every build id.
|
|
*/
|
|
void import("./boot.tsx").catch(async (error: unknown) => {
|
|
const { renderBootFailure } = await import("./render-boot-failure.tsx");
|
|
renderBootFailure(error);
|
|
});
|