This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-23
Channels
- # aws (4)
- # beginners (14)
- # boot (7)
- # cider (75)
- # clara (87)
- # cljsrn (6)
- # clojure (115)
- # clojure-berlin (2)
- # clojure-dusseldorf (2)
- # clojure-gamedev (8)
- # clojure-italy (15)
- # clojure-russia (9)
- # clojure-spec (46)
- # clojure-uk (195)
- # clojurescript (24)
- # css (44)
- # datascript (19)
- # datomic (18)
- # emacs (6)
- # fulcro (57)
- # hoplon (1)
- # jobs (3)
- # jobs-discuss (37)
- # jobs-rus (3)
- # luminus (6)
- # lumo (28)
- # off-topic (24)
- # onyx (11)
- # planck (8)
- # re-frame (31)
- # remote-jobs (12)
- # rum (10)
- # schema (4)
- # shadow-cljs (28)
- # specter (24)
- # sql (3)
- # tools-deps (34)
- # vim (43)
- # yada (10)
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.
: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
{:app
;; pull in production specific cljs sources
{:source-paths ["env/prod/cljs"]
:compiler
;; get medieval on the compiled output
{:optimizations :advanced
:pretty-print false
:externs ["externs/leaflet.js"]
:closure-warnings
{:non-standard-jsdoc :off}}}}}}}