Fork me on GitHub

Do any of the @types/* node modules help with extern business in shadow?


I've gotten devcards setup with my shadow app but trying to figure out how to run one command to run my app and the devcards on different ports. I'm guessing because they use the same output folder I'd have to change that, but the port seems to be set for both configurations (my main app and devcards)


Think I figured it out, just had to make a devcards.html, and output my devcards build to another dir, then just run them both with watch.

Lucy Wang02:09:18

another option is to can add your devcards ns to the :preload section, e.g.

👍 3

interesting, I saw another option `

:dev {:compiler-options {:devcards true}}
in the docs, I'll try adding that as well


thanks for the better path, double compile seemed bloated


Had to dive deeper, interesting way to handle rendering either devcards or the main app.

Lucy Wang14:09:24

the compiler option is not necessary if you add the app.devcards ns to the preloads, because preloads are not included in release builds iirc

Pavel KlavĂ­k21:09:01

Hi, I am recently getting errors while working with Shadow-cljs in nREPL. It often happens that after code reloading, the repl gets broken and I am getting error messages from it. Restarting shadow-cljs helps. For instance, just now I am getting this:

=> #object[ReferenceError ReferenceError: re_frame is not defined]

Pavel KlavĂ­k21:09:17

I am frequently getting Timeout while waiting for result.

Pavel KlavĂ­k21:09:09

And shadow-cljs outputs this for instance:

[2020-09-20 23:33:38.961 - WARNING] :shadow.cljs.devtools.server.util/handle-ex - {:msg {:op :cljs-compile, :input {:code "(require '[orgpad.common.util.url :as url])", :ns cljs.user, :repl true}, :include-init true, :call-id 6, :from 52}}
AssertionError Assert failed: (symbol? repl-ns) (resolve.clj:639) (resolve.clj:639)
        shadow.cljs.repl/repl-require (repl.clj:207)
        shadow.cljs.repl/repl-require (repl.clj:187)
        shadow.cljs.repl/process-read-result (repl.clj:514)
        shadow.cljs.repl/process-read-result (repl.clj:494)
        shadow.cljs.repl/process-input (repl.clj:680)
        shadow.cljs.repl/process-input (repl.clj:658)
        shadow.cljs.devtools.server.worker.impl/fn--15155 (impl.clj:755)
        shadow.cljs.devtools.server.worker.impl/fn--15155 (impl.clj:745)
        clojure.lang.MultiFn.invoke (
        shadow.cljs.devtools.server.util/server-thread/fn--14818/fn--14819/fn--14827 (util.clj:285)

Pavel KlavĂ­k21:09:35

as response for running (require '[orgpad.common.util.url :as url])