This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
I want to make dynamic builds (builds that are not defined in shadow config) and a cljs dependency is not found and I am not sure where is the problem.
Expected a successful compilation but got "reagent.core" is not available, it was required by "bar/ns.cljs".
The dependencies worked fine when I had everything in shadow config.
(Simplified code in thread)
Here is a simplified code that shows what I am doing right now
;; src/baz/fe_build.clj
(ns baz.fe-build
(:require
[shadow.cljs.devtools.api :as shadow-api]
[shadow.cljs.devtools.server :as shadow-server]))
(defn watch
{:shadow/requires-server true}
[]
(shadow-server/start!)
(shadow-api/watch
{:build-id :foo,
:target :browser,
:output-dir "builds/foo/js",
:asset-path "/foo/js",
:modules {:main {:init-fn bar.ns/main}}}))
;; src/bar/ns.cljs
(ns bar.ns
(:require
[reagent.core :as r]))
;; shadow-cljs.edn
{:source-paths
["src"]
:dependencies
[[reagent "1.2.0"]]}
Via clj -X
Oh, so those dependencies in shadow config work like regular Clojure dependencies?
I mean clj
launches the JVM then nothing even looks at shadow-cljs.edn
for dependencies
Oh okay, I thought they are somewhat special because they are meant for cljs. Thanks for the quick response!