I have a web app that uses Clojure on backend and ClojureScript on frontend, and it consists of several pages, each requiring appropriate builded js file.
Now I know that cljsbuild can build separate builds (if specified in :builds section of config file), provided that each build has it's own folder.
Problem is: now I need to duplicate some shared code in each folder in order to build properly. Besides, it's really annoying that I have to create whole new folder for even trivial cljs file to be used, not to mention editing every time the :builds section of my project.clj.
So, it's 2016, and all the tutorials on ClojureScript I've seen so far, are for single-page applications. Are there any resources or best practices for what I'm looking for, am I missing something out?
How do I use ClojureScript in standard multi-page Clojure-stack web app?
Thanks.
The :modules
compiler option can be used to split your clojurescript build into optimized modules that can be required on demand.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With