From f39cf3904d1e22f2f8291b140f6940302f7999a6 Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Sun, 22 Feb 2026 21:06:47 -0500 Subject: [PATCH] fix(frontend): Remove ES6 exports from api.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove ES6 export statement from api.ts that was causing CommonJS compilation in browsers, breaking window.api initialization. Issue: TypeScript compiled 'export { ... }' to CommonJS format (exports.apiGet = ...), which browsers don't support. Fix: Remove export statement, rely on existing window.api assignment. This produces browser-compatible JavaScript. Before: export { getAuthHeader, apiGet, ... } → CommonJS exports After: (window as any).api = { ... } → browser global Resolves: 'Uncaught ReferenceError: exports is not defined' Resolves: 'Uncaught TypeError: window.api is undefined' --- web/src/api.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/web/src/api.ts b/web/src/api.ts index 37680a8..015c271 100644 --- a/web/src/api.ts +++ b/web/src/api.ts @@ -87,15 +87,3 @@ function handleError(error: unknown, context: string): void { handleVoidResponse, handleError }; - -export { - getAuthHeader, - apiGet, - apiPost, - apiPut, - apiDelete, - apiPatch, - handleResponse, - handleVoidResponse, - handleError -};