8396bdeb48
Playwright serializes the function passed to page.evaluate via .toString() and runs it in the browser context. With main-process minify on, esbuild renames inlined helpers (e.g. __name) and closure references to two-letter identifiers like FK/p/ed; their definitions stay at module scope on the Node side, so the browser eval throws ReferenceError. Mac dev builds were unaffected because dev mode doesn't minify; only packaged Windows builds hit this. Main process bundle size is irrelevant (loaded once on startup) so turning minify off is the cheapest correct fix. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>