You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In development we use Figwheel to build our ClojureScript resources. We serve target/resources/acme/public for our static assets and build to target/resources/acme/public/js/frontend.js. We have target/resources added as a path in our deps.edn file.
I think having acme between resources and public is confusing the helpful classpath handling. When we build, Figwheel looks for target/resources/acme as a directory on the classpath, and doesn't realise that target/resourcesis on the classpath.
[Figwheel] Validating figwheel-main.edn
[Figwheel] figwheel-main.edn is valid \(ツ)/
[Figwheel:WARNING] Attempting to dynamically add "target/resources/acme" to classpath!
[Figwheel:WARNING] Target directory "target/resources/acme" is not on the classpath
[Figwheel:WARNING] Please fix this by adding "target/resources/acme" to your classpath
I.E.
For Clojure CLI Tools in your deps.edn file:
ensure "target/resources/acme" is in your :paths key
For Leiningen in your project.clj:
add it to the :resource-paths key
[Figwheel] Compiling build app to "target/resources/acme/public/js/frontend.js"
[Figwheel] Successfully compiled build app to "target/resources/acme/public/js/frontend.js" in 4.418 seconds.
[Figwheel] Watching paths: ("src/cljs""src/cljc") to compile build - app
[Figwheel] Starting Server at http://localhost:9500
(fw-util/dir-on-classpath?"target/resources")
=> "<redacted>/acme-app/target/resources"
(fw-util/dir-on-classpath?"target/resources/acme")
=> nil
Here is our config:
{:id"app":options {:main acme.frontend.main
:preloads [day8.re-frame-10x.preload]
:parallel-buildtrue:output-to"target/resources/acme/public/js/frontend.js":output-dir"target/resources/acme/public/js/frontend.out":optimizations:none}
:config {:watch-dirs ["src/cljs""src/cljc"]
:css-dirs ["target/resources/acme/public/css"]
;; We make our resources go to target/resources/acme instead;; of target/resources. Figwheel doesn't understand this and;; tries to add target/resources to the classpath a second time.;; Disabling helpful-classpaths will prevent this, though we still get;; a warning from Figwheel that the directory is not on the classpath.:helpful-classpathsfalse}}
We are turning off :helpful-classpaths, but I think this might actually be a bug? I could be wrong though.
The text was updated successfully, but these errors were encountered:
Also keep in mind that you can set :target-dir to target/resources/acme and then use the default output-to and output-dir this might make things smoother in the meantime.
In development we use Figwheel to build our ClojureScript resources. We serve
target/resources/acme/public
for our static assets and build totarget/resources/acme/public/js/frontend.js
. We havetarget/resources
added as a path in our deps.edn file.I think having
acme
betweenresources
andpublic
is confusing the helpful classpath handling. When we build, Figwheel looks fortarget/resources/acme
as a directory on the classpath, and doesn't realise thattarget/resources
is on the classpath.Here is our config:
We are turning off
:helpful-classpaths
, but I think this might actually be a bug? I could be wrong though.The text was updated successfully, but these errors were encountered: