diff --git a/packages/host/app/routes/render.ts b/packages/host/app/routes/render.ts index b0d62af3d62..6973c3fc856 100644 --- a/packages/host/app/routes/render.ts +++ b/packages/host/app/routes/render.ts @@ -349,6 +349,16 @@ export default class RenderRoute extends Route { this.lastStoreResetKey = resetKey; } } + // Stamp `card-api` and `file-api` as runtime deps of this render. + // `file-api` is the public URL the indexer references when + // invalidating file extracts; doing the import here records the + // deps against the active tracking session without forcing + // matrix-service construction (which would also pull in the matrix + // SDK + client + event bindings the prerender never touches). + await Promise.all([ + this.loaderService.loader.import(`${baseRealm.url}card-api`), + this.loaderService.loader.import(`${baseRealm.url}file-api`), + ]); if (parsedOptions.fileExtract) { let state = new TrackedMap(); state.set('status', 'ready');