Fork me on GitHub
#shadow-cljs
<
2023-05-12
>
friedqi03:05:13

Hi, I'm having trouble getting cljs-devtools working. Chrome is showing this error in the console: main.js:430 CLJS DevTools: some custom formatters were not rendered. I followed instructions to enable custom formatters and reloaded, etc. Still get the error. I'm using Calva and my edn file is:

{:source-paths ["src"]
 :dependencies [[binaryage/devtools "1.0.6"]
                [cjohansen/dumdom "2023.03.27"]]

 :dev-http {8700 "public"}
 :builds
 {:app {:target :browser
        :output-dir "public/js/compiled"
        :asset-path "/js/compiled"
        :modules {:main {:init-fn play.core/init}}}}}
The app is behaving correct. I'm just getting started so would like to explore and have the whole toolset working 🙂. Any ideas?

thheller05:05:46

It says "some", so maybe some others are enabled and everything is fine?

thheller05:05:19

config looks fine. I never use cljs-devtools, so cannot make any other suggestions

hifumi12306:05:31

i dont see any preloads so id guess that may be the issue

thheller07:05:57

thats added automatically when cljs-devtools is present on the classpath

thheller07:05:34

the code is getting loaded since there is some console message.

Jakub Šťastný14:05:53

What target am I supposed to use for web workers? I had no luck with either ESM or browser, for browser I’m getting browser bootstrap used in incorrect target as there ain’t no DOM.

hifumi12317:05:18

Web workers should be a module with :web-worker true (cf. https://shadow-cljs.github.io/docs/UsersGuide.html#_web_workers ). The linked page also includes a simple example of actually starting the worker and posting a message to it

👍 2