From 501256f16bb28a13f1124bcb93fbd07d28f2ba8d Mon Sep 17 00:00:00 2001 From: Florian Schroedl Date: Fri, 20 Sep 2024 09:34:54 +0200 Subject: [PATCH] Disable namespace loading info in console from shadow-cljs --- frontend/dev/preload.cljs | 7 +++++++ frontend/shadow-cljs.edn | 7 +++++-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 frontend/dev/preload.cljs diff --git a/frontend/dev/preload.cljs b/frontend/dev/preload.cljs new file mode 100644 index 000000000..57d3cc0d8 --- /dev/null +++ b/frontend/dev/preload.cljs @@ -0,0 +1,7 @@ +(ns preload + (:require + [devtools.core :as devtools])) + +;; Silence shadow-cljs devtools (ns reloading) +(devtools/set-pref! :dont-display-banner true) +(devtools/set-pref! :min-expandable-sequable-count-for-well-known-types 0) diff --git a/frontend/shadow-cljs.edn b/frontend/shadow-cljs.edn index ef001a93d..6e26f906d 100644 --- a/frontend/shadow-cljs.edn +++ b/frontend/shadow-cljs.edn @@ -8,7 +8,9 @@ {:target :browser :output-dir "resources/public/js/" :asset-path "/js" - :devtools {:browser-inject :main + :devtools {:preloads [preload devtools.preload] + :log false + :browser-inject :main :watch-dir "resources/public" :reload-strategy :full} :build-options {:manifest-name "manifest.json"} @@ -65,7 +67,8 @@ :compiler-options {:output-feature-set :es2020 :output-wrapper false - :warnings {:fn-deprecated false}} + :warnings {:fn-deprecated false} + :closure-defines {shadow.debug.LogLevel :warning}} :release {:closure-defines {goog.DEBUG false