2

I'm building an app using:

lein cljsbuild once min

where my min config is

{: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}}

I end up with 3 js files: cljs_base.js, constants_table.js and app.js

When I include them in my index.html file in that order, I get a console exception:

Uncaught TypeError: cljs.core.Keyword is not a constructor at constants_table.js:1

If I add :optimize-constants false then it builds the modules correctly.

akond
  • 15,865
  • 4
  • 35
  • 55
Scott Klarenbach
  • 37,171
  • 15
  • 62
  • 91
  • I don't think you should include cljs_base.js or constants_table.js. BTW what is `:entries #{app.core}`? – akond Aug 08 '17 at 04:40

0 Answers0