           (some? target)]
     :post [(cljs/compiler-state? %)]}
 
-   (let [config
+   (let [{:keys [compiler-options] :as config}
          (config-merge config mode)
 
          target-fn

               {:stage stage :mode mode :config config}))
      after)))

(defn config-merge [config mode]
  ;; FIXME: merge nested maps, vectors
  (let [mode-opts
        (get config mode)]
    (merge config mode-opts)))

(defn get-target-fn [target]


  (:refer-clojure :exclude (compile flush))
  (:require [clojure.java.io :as io]
            [clojure.spec :as s]
            [clojure.pprint :refer (pprint)]
            [shadow.cljs.build :as cljs]
            [shadow.cljs.devtools.server.config :as config]))

