Fork me on GitHub
#cljs-dev
<
2017-08-25
>
shrimpywu00:08:15

Hi Experts, with Leiningen, can we pass clojure compiler options, specifically "renamePrefixNamespace" https://github.com/google/closure-compiler-js/blob/master/usage.txt but i don't see that option in https://clojurescript.org/reference/compiler-options

shaunlebron00:08:53

(fyi: this isn’t leiningen-related, since cljsbuild compiler options is passed directly to the cljs compiler)

dnolen19:08:25

@shrimpywu don’t support that, but for no particular reason other than it hasn’t been suggested before

dnolen19:08:31

issue + patch welcome

shrimpywu20:08:43

@dnolen hmm.. right now if we use the ":modules" option with ":optimization :advanced" flag, compile will expose a lot of global functions/vars. From documentation, if we have "renamePrefixNamespace", compile will put all the globale function/vars under the "renamePrefixNamespace" I would like create a issue, can you point me to where is the right place for it? And I am happen to work on a patch if there is guildeline on how to work on the clojurescript compiler, and can you point me to a sample how other options are hook-up (this is my first few days playing around with clojure/clojurescript)

thheller07:08:01

@shrimpywu I’m using renamePrefixNamespace in shadow-cljs and can confirm that it works. There is no compiler option for it though but you could add it to cljs.closure/set-options