Fork me on GitHub

how do I include external react components into my CLJS compile? Almost all of them are commonjs modules and :foreign-libs isn't working for me


Hi, does anyone know of a relatively maintained example app with a datomic backend and re-frame frontend? Kinda like this I guess


@jiangts: i've used browserify for this, creating a little shim that requires the module and stashes it on window for easy access


@mikethompson: yeah, I checked that link as well (similar to what @mccraigmccraig stated). maybe it's because i'm not too familiar with browserify, but unfortunately when I tried that I got some weird error saying I was require-ing two React.js's and it was having a problem


also it's not super desirable because I care about my build size and if I do it this way, all the code in my shim will have 1 copy of react and all my reagent code has its own copy


my latest attempt was to study how cljsjs packages were created, but I still haven't gotten it working


@mikethompson: is it recommended to use browserify to use npm modules in the browser with cljs, or have people had luck with something like webpack?


@adamkowalski: Sorry, I don't have deep knowledge around all this. I'd suggest asking in #C03S1L9DN channel.