1

我安装了 shadow-cljs 如下:

npm install -g shadow-cljs

然后我创建了一个 shadow-cljs.edn 文件,其中包含以下内容:

[{:id "app"
                :source-paths ["src/cljs" "src/cljc" "dev"]

                :figwheel {:on-jsload "myapp.system/reset"}

                :compiler {:main cljs.user
                           :asset-path "js/compiled/out"
                           :output-to "dev-target/public/js/compiled/myapp.js"
                           :output-dir "dev-target/public/js/compiled/out"
                           :source-map-timestamp true
                           :preloads [devtools.preload]
                           :optimizations :none}}

               {:id "test"
                :source-paths ["src/cljs" "test/cljs" "src/cljc" "test/cljc"]
                :compiler {:output-to "dev-target/public/js/compiled/testable.js"
                           :main myapp.test-runner
                           :optimizations :none}}

               {:id "min"
                :source-paths ["src/cljs" "src/cljc"]
                :jar true
                :compiler {:main myapp.system
                           :output-to "resources/public/js/compiled/myapp.js"
                           :output-dir "target"
                           :source-map-timestamp true
                           :optimizations :advanced
                           :closure-defines {goog.DEBUG false}
                           :pretty-print false}}
               ]

然后在已经运行的 clj repl 中,我做 Mx cider-connect-sibling-cljs,并选择 shadow repl 选项。但我知道 shadow-cljs Clojurescript REPL 不可用。如何让影子 cljs 工作?

4

0 回答 0