From 2a29f41aa8f7edfc68d464f13925a0e4a21da6b8 Mon Sep 17 00:00:00 2001 From: clawbot Date: Sat, 7 Mar 2026 05:48:10 -0800 Subject: [PATCH] fix: bundle preact into SPA instead of leaving as external require The esbuild config had --external:preact which told the bundler to leave preact as a require() call instead of including it in the bundle. Since the SPA loads app.js directly in the browser (no CDN or import map for preact), the browser has no require() function and throws: Uncaught Error: Dynamic require of "preact" is not supported Fix: - Remove --external:preact from build.sh so preact is bundled into app.js - Add --format=esm to output proper ESM instead of IIFE with CJS shims - Update index.html to use + diff --git a/web/src/index.html b/web/src/index.html index 282793f..13cfc93 100644 --- a/web/src/index.html +++ b/web/src/index.html @@ -8,6 +8,6 @@
- + -- 2.49.1