1

ClojureScript ビルドで figwheel を使用しようとしています。

すでに動作しlein cljsbuild autoていますが、入れなければなりません:optimisations :whitespace

そうしないと、ブラウザにメッセージが表示されます:

Uncaught ReferenceError: goog is not defined

ただし、figwheel:optimisations :noneを実行する必要があります。ここに私のleiningenファイルの一部があります:

:cljsbuild {
          :builds
          [{:id "dev"
            :source-paths ["src/cljs"]

            :figwheel { :websocket-host "localhost"
                       ;;:on-jsload "example.core/fig-reload"
                       :autoload true
                       :heads-up-display true
                       :load-warninged-code true
                       ;;:url-rewriter "example.core/fig-url-rewrite"
                       }

            :compiler {;; :main
                       :output-to  "resources/public/js/gdb/gdb.js"
                       :output-dir "resources/public/js/gdb/cljsbuild-dev"
                       ;;:asset-path "js/out"

                       :optimizations :none
                       :source-map "resources/public/js/gdb/gdb.js.map"
                       :pretty-print true}}]}

不足している依存関係を取得するために何が不足していますか?

4

2 に答える 2

6

これは RTFM の典型的なケースであることがわかりました。答えはClojureScript クイックスタートガイドにありました。

具体的には、 Less Boilerplateセクション:mainで指定されているように、フィールドを追加する必要がありました。

:main "example.core"
于 2015-08-31T08:43:21.117 に答える