Fork me on GitHub

So I have spent a bunch of time really looking at the approach folks take when integrating ClojureScript with ReactNative. I have worked through several interesting examples that simplify the integration story. The main problem boils down to “How do you load and initialize an opt none compiled CLJS application inside bundle compiled by a modern day JS tool like webpack or FB’s metro?”


Right now this is very doable, if you understand the platforms well enough, but it exposes some opportunities to think more about this problem in general, and perhaps make some small changes that will facilitate allowing JS compiled bundles to be the top level entry point of an application that is primarily or partially a CLJS application.


For example: :global-exports is an absolute win in terms of supporting the import of external JS libs via cljs ns forms. But :global-exports is associated with the idea of requiring a particular foreign-lib “file”. It seems it would be helpful for a :global-exports like, top-level CLJS compiler option to let the compiler know what is available for import from the greater environment. This would also be valuable in the context of a web page which may already provide various libs.