                      tempf))
         cfg (-> cfg
                 (cond->
-                    temp-dir (assoc-in [:options :output-dir] (default-output-dir temp-dir))
-                    temp-dir (assoc-in [:options :output-to]  (default-output-to temp-dir))
+                    temp-dir (assoc-in [:options :output-dir]
+                                       (default-output-dir* temp-dir))
+                    temp-dir (assoc-in [:options :output-to]
+                                       (default-output-to* temp-dir))
                     temp-dir (assoc-in [:options :asset-path]  "cljs-out"))
                 (assoc-in [:options :aot-cache] false)
                 (update :options #(assoc % :main

(defn- config-default-dirs [{:keys [options ::config ::build] :as cfg}]
  (cond-> cfg
    (nil? (:output-to options))
    (assoc-in [:options :output-to] (default-output-to
                                     (:target-dir config)
                                     (:id build)))
    (nil? (:output-dir options))
    (assoc-in [:options :output-dir] (default-output-dir
                                      (:target-dir config)
                                      (:id build)))))

(defn figure-default-asset-path [{:keys [figwheel-options options ::config ::build] :as cfg}]
  (let [{:keys [output-dir]} options]
    ;; TODO could discover the resource root if there is only one
    ;; or if ONLY static file serving can probably do something with that
    ;; as well
    ;; UNTIL THEN if you have configured your static resources no default asset-path
    (when-not (contains? (:ring-stack-options figwheel-options) :static)
      (let [parts (fw-util/relativized-path-parts (or output-dir
                                                      (default-output-dir
                                                       (:target-dir config)
                                                       (:id build))))]
        (when-let [asset-path
                   (->> parts
                        (split-with (complement #{"public"}))
                        last
                        rest
                        not-empty)]
          (str (apply io/file asset-path)))))))

;; targets options
(defn- config-default-asset-path [{:keys [options] :as cfg}]

                           nil))
                    "target")]
          (fw-util/dir-on-classpath? target-dir))
        temp-dir (when-not (or (= :nodejs (:target (:options cfg)))
                               target-on-classpath?)
                   (let [tempf (java.io.File/createTempFile "figwheel" "repl")]
                     (.delete tempf)
                     (.mkdirs tempf)
