           (when (not-empty '~crossovers)
             (copy-crossovers#)
             (cljsbuild.util/once-every-bg 1000 "copying crossovers" copy-crossovers#))
-          (let [build# (first '~parsed-builds)]
-            (figwheel-sidecar.auto-builder/autobuild (:source-paths build#)
-                                             (:compiler build#)
-                                             ~live-reload-options)))))))
+          (figwheel-sidecar.auto-builder/autobuild* '~parsed-builds
+                                                    ~figwheel-options))))))
 
 (defn optimizations-none?
   "returns true if a build has :optimizations set to :none"

       (apply-to-key vec :css-dirs)
       (apply-to-key vec :resource-paths)))

;; duh!! I should be forcing the optimizations :none option here.

(defn figwheel
  "Autocompile ClojureScript and serve the changes over a websocket (+ plus static file server)."
  [project & build-ids]
  (let [project (narrow-to-one-build project (first build-ids))
        current-build (first (get-in project [:cljsbuild :builds]))
        figwheel-options (prep-options
                          (merge
                           { :output-dir (-> current-build :compiler :output-dir )
                             :output-to  (-> current-build :compiler :output-to ) }
                           (:figwheel project)
                           ;; we can get the resource paths from the project
                           (select-keys project [:resource-paths])))]
    (let [errors (check-for-valid-options
                  (:cljsbuild project)
                  figwheel-options)]
      (println (str "Figwheel: focusing on build-id " "'" (:id current-build) "'"))
      (if (empty? errors)
        (run-compiler project
                      (config/extract-options project)

           (System/exit 1))))
     requires)))

;; this is really deviating from cljsbuild at this point.
;; need to dig in and probably rewrite this

;; need to get rid of crossovers soon

(defn run-compiler [project {:keys [crossover-path crossovers builds]} figwheel-options]
  (println "Compiling ClojureScript.")
  ; If crossover-path does not exist before eval-in-project is called,
  ; the files it contains won't be classloadable, for some reason.
