From 193529913da00214572db8c3f27ed600d60a88e9 Mon Sep 17 00:00:00 2001 From: 4gray Date: Sat, 11 Jul 2026 07:20:57 +0200 Subject: [PATCH] fix(electron): inline TS helpers so the sandboxed preload keeps working MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The frame pump's async/await (target es2015 + importHelpers) made webpack externalize tslib in main.preload.js. Sandboxed preloads can only require Electron's built-in module whitelist, so the entire preload script failed to load and window.electron disappeared for every run without the frame-copy flag. importHelpers:false for electron-backend keeps the preload bundle self-contained — and future async code in preload can no longer silently reintroduce the breakage. Verified live: sandboxed run now has the bridge, reports engine 'native' and frameCopyAvailable true. Co-Authored-By: Claude Fable 5 --- apps/electron-backend/tsconfig.app.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/electron-backend/tsconfig.app.json b/apps/electron-backend/tsconfig.app.json index 784ccb3b5..cdc691548 100644 --- a/apps/electron-backend/tsconfig.app.json +++ b/apps/electron-backend/tsconfig.app.json @@ -2,7 +2,8 @@ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "../../dist/out-tsc", - "types": ["node"] + "types": ["node"], + "importHelpers": false }, "files": ["../../global.d.ts"], "exclude": [