2

我正在使用以下方法构建应用程序:

lein cljsbuild once min

我的最小配置在哪里

{:id "min"
 :source-paths ["src"]
 :compiler {:output-dir "resources/public/js"
            :main app.core
            :optimizations :advanced
            :modules {:app
                      {:output-to "resources/public/js/app.js"
                       :entries #{app.core}}}
            :pretty-print false}}

我最终得到了 3 个 js 文件:cljs_base.js、constants_table.js 和 app.js

当我按顺序将它们包含在我的 index.html 文件中时,我得到一个控制台异常:

未捕获的类型错误:cljs.core.Keyword 不是 constants_table.js:1 的构造函数

如果我添加:optimize-constantsfalse 那么它会正确构建模块。

4

0 回答 0