ClojureScript is aimed at users who are already using jQuery and other helper libraries like Underscore.js. These two alone put your JS application around ~40K gzipped without having written a line of code yourself.
ClojureScript applications start at around ~20K gzipped and go up from there. If for some reason you need your JavaScript to be smaller than this you will need to look elsewhere. However I'm pretty skeptical of this as these sizes are smaller than typical image assets for a website. HTH, David On Tue, Feb 3, 2015 at 1:52 AM, Petr Gladkikh <[email protected]> wrote: > Hello. > > Probably this question was answered elsewhere but I could not find it > myself. > The question is about minimal compiled output size. I am trying to use > ClojureScript for a project that needs only small pieces of javascript (at > least currently) but I noticed that even one-liner with 'advanced' > optimization setting would be compiled to ~75kB javascript mostly > containing cljs/core's code. This seems like an unreasonable overhead. I > use Leiningen's cljsbuild for compilation. > > So the questions are > 1. Why cljs/core is not optimized out even with 'advanced' optimization > setting while there are no references to it's code in application? > > 2. Is there a way to streamline output for small ClojureScript codebases > or it is just accepted that there would be such overhead? > > > -- > Note that posts from new members are moderated - please be patient with > your first post. > --- > You received this message because you are subscribed to the Google Groups > "ClojureScript" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/clojurescript. > -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
