From ed837d8e4f42b42ea5dbcfa54c98b06d149b8f22 Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Thu, 5 Mar 2026 18:22:14 -0800 Subject: [PATCH] fix: add wasm plugin to campaign-planner vite build entry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The folk-campaign-planner imports SocialsLocalFirstClient which pulls in Automerge WASM — needs vite-plugin-wasm and alias like other local-first module builds. Co-Authored-By: Claude Opus 4.6 --- vite.config.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/vite.config.ts b/vite.config.ts index 69bf647..49a8bb9 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -635,11 +635,18 @@ export default defineConfig({ resolve(__dirname, "dist/modules/rsocials/socials.css"), ); - // Build campaign planner component + // Build campaign planner component (with Automerge WASM support via local-first-client) await build({ configFile: false, root: resolve(__dirname, "modules/rsocials/components"), + plugins: [wasm()], + resolve: { + alias: { + '@automerge/automerge': resolve(__dirname, 'node_modules/@automerge/automerge'), + }, + }, build: { + target: "esnext", emptyOutDir: false, outDir: resolve(__dirname, "dist/modules/rsocials"), lib: {