Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

bootstrap.ts

11 lines423 Bytes

1import { showBootError } from "./lib/bootError";
2import { chunkLoadState, handleChunkLoadErrors } from "./lib/chunkReloadGuard";
3​
4handleChunkLoadErrors();
5​
6// Shared dev chunks need the React refresh preamble first. Catch failures before React mounts.
7export const boot = import("./main")
8 .then(({ startup }) => startup)
9 .catch((error: unknown) => {
10 if (!chunkLoadState.reloadScheduled) showBootError(error);
11 });