ClojureScript 复制外部试剂插件

ClojureScript duplicate externs Reagent addons

我正在制作一个依赖 Reagent 以及 ReactTransitionGroups 的项目。在我包含 ReactTransitionGroups 之后,出于某种原因我不得不包含 react-dom 。但在那之后我无法制作我的 uberjar 因为 anduplicate externs 错误。

 :dependencies [[org.clojure/clojure "1.8.0"]

              [reagent "0.6.0" :exclusions [cljsjs/react]]
              [cljsjs/react-with-addons "15.4.2-2"]
              [cljsjs/react-dom "15.4.2-2"]
              ]    

这也是我的 cljs 设置

:cljsbuild
  {:builds {:min
        {:source-paths ["src/cljs" "src/cljc" "env/prod/cljs"]
         :compiler
         {:output-to "target/cljsbuild/public/js/app.js"
          :output-dir "target/uberjar"
          :optimizations :simple
          :pretty-print  false}}
        :app
        {:source-paths ["src/cljs" "src/cljc" "env/dev/cljs"]
         :compiler
         {:main "ironrainbow.dev"
          :asset-path "/js/out"
          :output-to "target/cljsbuild/public/js/app.js"
          :output-dir "target/cljsbuild/public/js/out"
          :source-map true
          :optimizations :none
          :pretty-print  true}}}}

还有我尝试 lein uberjar 时的错误代码

SEVERE: ERROR - Duplicate extern input: file:/C:/Users/Paul/.m2/repository/cljsjs/react/15.4.2-2/react-15.4.2-2.jar!/cljsjs/react/common/react.ext.js

WARNING: 1 error(s), 0 warning(s) ERROR: JSC_DUPLICATE_EXTERN_INPUT. Duplicate extern input: file:/C:/Users/Paul/.m2/repository/cljsjs/react/15.4.2-2/react-15.4.2-2.jar!/cljsjs/react/common/react.ext.js at (unknown source) line (un known line) : (unknown column)

一些包包含其他包,有时这些包是重复的。您必须像这样排除所有重复项:

[cljsjs/react-with-addons "15.4.2-2"] 
[cljsjs/react-dom "15.4.2-2" :exclusions [cljsjs/react]] 
[cljsjs/react-dom-server "15.4.2-2" :exclusions [cljsjs/react]]

要查看整个依赖关系树,运行:lein deps :tree