emezeske / lein-cljsbuild

Leiningen plugin to make ClojureScript development easy.
Other
1.1k stars 151 forks source link

:npm-deps support #463

Closed ar7hur closed 7 years ago

ar7hur commented 7 years ago

ClojureScript 1.9.518 introduced a :npm-deps build option to easily use Node.js libraries (more info), but cljsbuild doesn't recognize the key:

Found unrecognized key :npm-deps at path (:cljsbuild :builds 0 :compiler)
Must be one of: :infer-externs, :output-dir, :closure-warnings, :closure-defines, :static-fns, :dump-core, :externs, :ups-libs, :optimize-constants, :cache-analysis, :modules, :elide-asserts, :language-out, :optimizations, :recompile-dependents, :source-map-path, :closure-extra-annotations, :ups-foreign-libs, :parallel-build, :verbose, :warnings, :preloads, :source-map-inline, :anon-fn-naming-policy, :output-to, :source-map-timestamp, :preamble, :asset-path, :print-input-delimiter, :output-wrapper, :ups-externs, :hashbang, :source-map, :watch-fn, :foreign-libs, :libs, :target, :pseudo-names, :devcards, :external-config, :compiler-stats, :main, :pretty-print, :closure-output-charset, :language-in, :warning-handlers or :emit-constants

/.../project.clj:35:27
  34                 :compiler {:main axe.core
  35                            :npm-deps {:left-pad "1.1.3"}
                                ^---  The key :npm-deps is unrecognized
  36                            :asset-path "js/compiled/out"
  37                            :output-to "resources/public/js/compiled/axe.js"
  38                            :output-dir "resources/public/js/compiled/out"
  39                            :source-map-timestamp true
mneise commented 7 years ago

Adding a new compiler option to ClojureScript usually doesn't require a change in cljsbuild. It's likely that there is a typo or something else doesn't fit. Would you mind posting your whole project.clj?

danielcompton commented 7 years ago

That error looks like a Figwheel error, not a cljsbuild one. What are you running to produce that error?

ar7hur commented 7 years ago

@danielcompton you're absolutely right, this is generated by Figwheel. I'll move the issue over there. Thanks and sorry for the inconvenience!

ar7hur commented 7 years ago

Actually, it was just fixed in Figwheel: https://github.com/bhauman/lein-figwheel/commit/5b809b0c631b073c4ad79d6a5aa612e6bcc23928