fix(web): make first wasm load work on remote deployment
- Correct engine-manifest single wasm SHA and reuse cache for verification. - Remove duplicate main-thread wasm fetch; raise init timeout to 300s. - Record production deployment details and verification evidence. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -262,7 +262,9 @@ export async function loadWebEngineManifest(url = "/engine-manifest.json"): Prom
|
||||
export async function verifyWasmResource(
|
||||
resource: Pick<WasmResource, "url" | "sha256"> & Partial<Pick<WasmResource, "id">>,
|
||||
): Promise<void> {
|
||||
const response = await fetch(resource.url, { cache: "no-store" });
|
||||
// Reuse the HTTP cache populated by the worker's module loader. A no-store
|
||||
// verification fetch would download the multi-hundred-MB engine wasm twice.
|
||||
const response = await fetch(resource.url, { cache: "force-cache" });
|
||||
const resourceId = resource.id ?? resource.url;
|
||||
if (!response.ok) throw new Error(`WASM resource request failed: ${resourceId}`);
|
||||
const bytes = await response.arrayBuffer();
|
||||
|
||||
Reference in New Issue
Block a user