Fork me on GitHub
Alex H06:04:16

@thheller whatever that did, it doesn't work anymore

Alex H06:04:02

onlyIn doesn't appear in externs.shadow.js anymore, and the generated code is mangled incorrectly, as before


Hi guys, I am using to compile cljs in a boot task. The compilation is fine and the files are written but they are not being picked up by server. To expand, I am using a ring server with site-defaults which is able to serve other resources but not the js files generated in the task.| The build config produced in the task is

{:target :browser, :output-dir /home/akash/.boot/cache/tmp/home/akash/workspace/voidwalker/gw3/-fmvxaj/resources/public/js, :asset-path /js, :compiler-options {:optimizations :simple}, :modules {:app {:entries []}}, :id :app, :build-id :app, :cache-root /home/akash/.boot/cache/cache/project/home/akash/workspace/voidwalker/com.joshuadavey.boot-shadow-cljs/cache}
When accessing the file.. I get response map is nil. My shadow-cljs.edn
{:source-paths ["src/cljs"]

 :nrepl {:port 55000}
 :http {:port 9070
        :host ""}

 :dependencies [[reagent "0.8.0-alpha2"]
                [reagi "0.10.1"]
                [funcool/bide "1.6.0"]
                [cljs-ajax "0.6.0"]
                [proto-repl "0.3.1"]
                [ "0.1.3"]
                [hickory "0.7.1"]
                [re-frame "0.10.5"]
                [cider/cider-nrepl "0.17.0-SNAPSHOT"]
                [refactor-nrepl "2.4.0-SNAPSHOT"]]

 :builds {:app {:target :browser
                :output-dir "resources/public/js"
                :asset-path "/js"
                :compiler-options {:optimizations :simple}
                  {:entries []}}}}}
What should I look into?


Got it ... the fix was to set output-dir to public/js since that is what is served. :man-facepalming:


@alex340 sorry shouldn't write code when tired. should be fixed in master.

Alex H10:04:01

@thheller yep, that seemed to work


When hot-reloading a namespace with shadow-cljs, vars which have been removed from the code remain defined (similar to sending the whole thing to the REPL). When hot-reloading with figwheel they are removed. Can I get that behaviour with shadow-cljs?


For example if I have a test defined in a namespace with deftest and remove or rename it, the old version's still there and gets executed with (run-tests).


this should be fixed as of [email protected]