Jonathon McKitrick
unread,Mar 16, 2015, 10:00:15 PM3/16/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to clojur...@googlegroups.com
I'd like suggestions on how to take advantage of current optimization settings and perhaps the new module feature, especially in production. I'm going to explain some of the decisions I've made, then paste in the relevant bits of my project file.
1. It's a tabbed app, where each tab is a SPA with a new entry point in a different namespace in a monolithic js payload: main.js.
2. jQuery is required by Bootstrap, and Bootstrap has its own js file.
3. I've tried several combinations of settings to get small payload without issues with externs and name-mangling, to varying degrees of success. Lately, I cannot get :advanced to work as I have it here.
So, here goes:
{:source-paths ["src/cljs"]
:compiler {:output-to "resources/public/js/main.js"
:optimizations :simple
:cache-analysis true
;:externs ["jquery/jquery-externs.js" ] ;"public/vendor/js/bootstrap.min.js"
:preamble ["jquery/jquery-2.1.1.min.js" "public/vendor/js/bootstrap.min.js"] ; "reagent/react.js"
}}
I leave the externs in because in the past they have helped. I also took react.js out, because cljsjs.react replaces it nicely.
I'm open to suggestions! And questions....