Fork me on GitHub
#luminus
<
2018-02-13
>
feihong06:02:30

not sure if this is right place to post about this, but i created a new luminus project using lein new luminus <project-name> +re-frame and then i added an externs.js file to the resources directory. the app works fine while developing, but after i build it using lein uberjar, i discovered that the generated app.js doesn’t have any of my code in it! after removing extern.js, the build contains a complete app.js.

kaosko18:02:29

@feihong.hsu mine works fine with extern.js. what's your contents of it? have you specified it in your uberjar conf?

feihong19:02:03

@kaosko my resources/externs.js looks like this:

var emojione = {
  shortnames = [],
  shortnameToUnicode = function() {}  
}
even if i comment everything in the file out, the build will not work. uberjar conf looks like this: `

feihong19:02:10

{:uberjar {:omit-source true
             :prep-tasks ["compile" ["cljsbuild" "once" "min"]]
             :cljsbuild
             {:builds
              {:min
               {:source-paths ["src/cljc" "src/cljs" "env/prod/cljs"]
                :compiler
                {;:main quickstart.core
                 :output-dir "target/cljsbuild/public/js"
                 :output-to "target/cljsbuild/public/js/app.js"
                 :source-map "target/cljsbuild/public/js/app.js.map"
                 :optimizations :advanced
                 :pretty-print false
                 :closure-warnings
                 {:externs-validation :off :non-standard-jsdoc :off}
                 :externs ["react/externs/react.js" "resources/externs.js"]}}}}

kaosko19:02:50

very close to mine, sounds weird if the externs.js is the only difference