Fork me on GitHub

I've got medium sized project, couple of years old now. app.js is 773k (195k gzipped)


@deg @codonovan IIRC uberjar produces two jars, one including the library dependencies and one only containing the class and resource files. I'd assume you are looking into the one without the dependencies.


@sveri I'm talking about the app.js file that gets downloaded to the browser. It is the same size in both builds; it does not depend on the Clojure dependencies.


@deg Ah sorry, I misunderstood your question then, please ignore my answer.


@deg in your uberjar -> cljsbuild do have optimizations set to advanced?


:profiles {
             ;; :provided {:dependencies [[org.clojure/clojurescript "1.9.518"]
             ;;                           [sablono "0.7.4"]]}

             ;; production builds
             :uberjar {;; AOT (Ahead Of Time) compilation
                       ;; see: 
                       :aot :all
                       :omit-source true
                       :env {:production true}
                       ;; build all cljs
                       :prep-tasks ["compile" ["cljsbuild" "once"]]
                       ;; pull in production specific clj sources and resources
                       :source-paths   ["env/prod/clj"]
                       :resource-paths ["env/prod/resources"]
                       ;; gets merged with default cljsbuild which compiles *.cljs and *.cljc
                       ;; files in source paths src/client and src/shared - here we set extra
                       ;; flags for our uberjar/production build - note how we include source
                       ;; path env/prod/cljs
                       :cljsbuild {:builds
                                    ;; pull in production specific cljs sources
                                    {:source-paths ["env/prod/cljs"]
                                     ;; get medieval on the compiled output
                                     {:optimizations :advanced
                                      :pretty-print  false
                                      :externs ["externs/leaflet.js"]
                                      {:non-standard-jsdoc :off}}}}}}}