This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-03
Channels
- # bangalore-clj (2)
- # beginners (29)
- # boot (52)
- # cider (4)
- # clara (3)
- # cljs-dev (34)
- # cljsjs (7)
- # cljsrn (3)
- # clojure (71)
- # clojure-austin (1)
- # clojure-dev (5)
- # clojure-france (20)
- # clojure-russia (51)
- # clojure-spec (9)
- # clojure-uk (20)
- # clojurescript (131)
- # core-async (56)
- # core-logic (6)
- # cursive (50)
- # datascript (19)
- # datomic (16)
- # dirac (118)
- # emacs (100)
- # events (4)
- # hoplon (14)
- # incanter (1)
- # jobs (7)
- # jobs-discuss (96)
- # jobs-rus (21)
- # lein-figwheel (5)
- # leiningen (21)
- # off-topic (11)
- # om (45)
- # onyx (42)
- # pamela (1)
- # pedestal (22)
- # portland-or (3)
- # re-frame (8)
- # reagent (5)
- # ring (9)
- # robots (1)
- # spacemacs (14)
- # specter (28)
- # sql (2)
- # untangled (165)
Hi! I’m using cljsjs for the first time (specifically, the Dragula library: https://github.com/cljsjs/packages/tree/master/dragula). When I compile with :whitespace
optimization, everything works as expected. But when I compile with advance compilation, I get the JS error dragula(…).Xb is not a function
My cljs setup is minimal in my project.clj:
:cljsbuild
{:builds
[{:source-paths ["src-cljs"]
:jar true
:compiler {:output-to "resources/public/js/main.js"
:optimizations :advanced}}]}
I assume that I am missing some option somewhere. If someone can spot the error quickly, can you let me know?@joy extern is probably missing something: https://github.com/cljsjs/packages/blob/master/dragula/resources/cljsjs/dragula/common/dragula.ext.js
is there a way to override the extern locally? I think it is missing the ‘on’ function, but I would like to test it out. If so, I could do a pull request.
yes, you can create local externs
and either include them with deps.cljs
or compiler options :externs
or, you can clone packages repo, fix the extern there and install jar to local mvn repo