From 38a15b7a34af4a7dcc74840ec1453b548a42fe69 Mon Sep 17 00:00:00 2001 From: Florian Schroedl Date: Sat, 4 Apr 2026 18:38:22 +0200 Subject: [PATCH] fix: CLJS watch mode missing todomvc from cljs_deps.js Two issues caused "Loading from local store..." after tmux restart: 1. Watch path only included `src/`, so `example/todomvc/` sources weren't compiled on the watcher's initial build, leaving pocketbook.todomvc out of cljs_deps.js. Fix: `-w "src:example/todomvc"` 2. Stale output dir from previous builds caused incremental compile to skip regenerating cljs_deps.js. Fix: `cljs:clean` task (deletes js output) runs before `cljs:watch`. --- bb.edn | 4 ++++ deps.edn | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bb.edn b/bb.edn index 24dab2f..c1ebf39 100644 --- a/bb.edn +++ b/bb.edn @@ -5,7 +5,11 @@ cljs {:doc "Compile ClojureScript (one-shot)" :task (shell "clj" "-M:cljs")} + cljs:clean {:doc "Remove compiled CLJS output" + :task (babashka.fs/delete-tree "example/todomvc/js")} + cljs:watch {:doc "Compile ClojureScript (watch mode)" + :depends [cljs:clean] :task (shell "clj" "-M:cljs-dev")} test {:doc "Run all server tests" diff --git a/deps.edn b/deps.edn index 78c499f..48726ec 100644 --- a/deps.edn +++ b/deps.edn @@ -25,4 +25,4 @@ :extra-deps {org.clojure/clojurescript {:mvn/version "1.11.132"} com.cognitect/transit-cljs {:mvn/version "0.8.280"} org.clojure/core.async {:mvn/version "1.7.701"}} - :main-opts ["-m" "cljs.main" "-co" "build.edn" "-w" "src" "-c"]}}} + :main-opts ["-m" "cljs.main" "-co" "build.edn" "-w" "src:example/todomvc" "-c"]}}}