This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-02-20
Channels
- # architecture (25)
- # beginners (68)
- # cider (10)
- # clara (3)
- # cljs-dev (90)
- # cljsrn (16)
- # clojure (132)
- # clojure-austin (7)
- # clojure-berlin (3)
- # clojure-czech (1)
- # clojure-dusseldorf (1)
- # clojure-greece (5)
- # clojure-italy (39)
- # clojure-spec (5)
- # clojure-uk (78)
- # clojured (2)
- # clojurescript (92)
- # community-development (6)
- # cursive (7)
- # data-science (1)
- # datascript (14)
- # datomic (32)
- # duct (8)
- # emacs (5)
- # figwheel (3)
- # fulcro (47)
- # hoplon (12)
- # jobs (10)
- # luminus (16)
- # lumo (5)
- # off-topic (1)
- # onyx (2)
- # parinfer (47)
- # pedestal (6)
- # re-frame (10)
- # reagent (2)
- # reitit (61)
- # ring (8)
- # ring-swagger (16)
- # shadow-cljs (116)
- # sql (17)
- # utah-clojurians (2)
- # vim (1)
@lambder Hi. You cannot merge additional build option.
module.cljs component adds :duct.server/figwheel
configuration to your config. However, :duct.server/figwheel
is defined as displace
configuration. So you need to define all of configurations you need by yourself.
About displace, see https://github.com/weavejester/meta-merge .
About adding configuration to cljs build option, see https://github.com/duct-framework/module.cljs/issues/5 .
You can also read source code of module.cljs and you will know more. https://github.com/duct-framework/module.cljs/blob/master/src/duct/module/cljs.clj
Yes, unfortunately vectors aren’t easy to override. I’ll probably change this in future (or I’ll accept a PR to do so!), but in the meantime you can replace the :builds
key in its entirety.
I did it with module:
(ns mirror4.modules.foreign-libs
(:require [integrant.core :as ig]))
(derive :mirror4.modules/foreign-libs :duct/module)
(defmethod ig/init-key :mirror4.modules/foreign-libs [_ foreign-libs]
{:req #{:duct.server/figwheel}
:fn (fn [config]
(let [builds (get-in config [:duct.server/figwheel :builds])
builds-with-foregin-libs (mapv
#(assoc-in % [:build-options :foreign-libs] foreign-libs)
builds)
]
(assoc-in config [:duct.server/figwheel :builds] builds-with-foregin-libs)
)
)})