【发布时间】:2017-07-19 21:26:35
【问题描述】:
我遵循了这个方法:http://blob.tomerweller.com/reagent-import-react-components-from-npm,效果很好。我什至设法在这个 re-frame 示例应用程序之上使用了我自己的 NPM 模块之一:https://github.com/Day8/re-frame/tree/master/examples/simple/
使用以下命令启动生成的应用程序:
lein clean && lein figwheel
一切正常,但当我这样做时:
lein do clean, with-profile prod compile
我收到了TypeError: a is undefined。有什么办法解决这个问题吗?
让我给你提供代码:错误提交是here,
而:dev 和:prod 配置文件都可以正常工作at this just previous commit。
更新:我设法修复了这样的编译版本(参见the 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,[…]
在我看来这是编译错误或错误。
更新 2:如果我将 :optimizations 设置为 :simple(原为 :advanced),我的代码编译正常。见the cljs compiler doc about this option。
谢谢。
【问题讨论】:
标签: compilation clojurescript cljsbuild