nha*_*nha 1 google-closure-compiler leiningen clojurescript figwheel
我想在我的ClojureScript构建中使用figwheel.
它lein cljsbuild auto
已经合作,但我必须把它:optimisations :whitespace
.
否则我在浏览器中收到一条消息:
Uncaught ReferenceError: goog is not defined
Run Code Online (Sandbox Code Playgroud)
然而,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}}]}
Run Code Online (Sandbox Code Playgroud)
我缺少什么来获取缺少的依赖项?
事实证明这是RTFM的经典案例.答案在ClojureScript快速入门指南中.
具体来说,我必须添加一个:main
字段,如Less Boilerplate部分中所指定的:
:main "example.core"
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
697 次 |
最近记录: |