I followed this: http://blob.tomerweller.com/reagent-import-react-components-from-npm , and it did a great job. I even managed to use one of my own NPM modules on top of this re-frame sample application: https://github.com/Day8/re-frame/tree/master/examples/simple/
Running the resulting application using
lein clean && lein figwheel
everything works fine, but when I do:
lein do clean, with-profile prod compile
I get a TypeError: a is undefined. Any idea to fix this?
Let me give you the code: bad commit - here , while the profiles :devand :prodwork fine with only a previous commit .
Update : I was able to fix the compiled version (see commit ):
return d.c?d.c(c,v,w):d.call(null,c,v,w)}}(G,r,b,c,d,e)),I=dw(G);rf.b?: […]
};w.b=v;w.c=f;return w}()}(c,d,e,f))};hf.b(ow,ik);hf.b(ow,bp);hf.b(ow,To); […]
function nx(a){var b=window.deps["react-mathjax"],
- c=window.deps.clubexpr.kf;
+ c=window.deps.clubexpr.renderLispAsLaTeX;
return new U(null,3,5,V,[Vj,b.Context,new U(null,4,null)}
function Wv(){return function(a){return function(){return new U(null,6,5,V,[…]
This seems like a wrong compilation configuration or error.
Update 2 : my code compiles OK if I installed :optimizationsin :simple(was :advanced). See the cljs compiler document for this option .
Thanks.