     (assoc opts :id (name (gensym "build_needs_id_")))
     (assoc opts :id (name (:id opts)))))
 
-(defn fix-build [opts]
-  (-> opts
+(defn move-compiler-to-build-options [build]
+  (if (and (not (:build-options build))
+           (:compiler build))
+    (-> build
+      (assoc :build-options (:compiler build))
+      (dissoc :compiler))
+    build))
+
+(defn fix-build [build]
+  (-> build
     ensure-id
-    (update-in [(if (:build-options opts) :build-options :compiler)] fix-build-options)))
+    move-compiler-to-build-options
+    (update-in [:build-options] fix-build-options)))
 
 (defn fix-builds [builds]
   (mapv fix-build builds))

      options)))

(comment
  (sane-output-to-dir {:output-dir "yes"})

  (sane-output-to-dir {:output-to "yes.js"})

  (sane-output-to-dir {:output-dir "yes/there"})

  (sane-output-to-dir {:output-to "outer/yes.js"})  
  
  )

(defn fix-build-options [build-options]
  (->> build-options
    (apply-to-key normalize-dir :output-dir)
    (sane-output-to-dir)
    (apply-to-key namify-module-entries :modules)

(defn check-for-valid-options
  "Check for various configuration anomalies."
  [{:keys [http-server-root] :as opts} print-warning build']
  (let [build-options (get-build-options build')
        opts? (and (not (nil? build-options)) (optimizations-none? build'))]
    (map
     #(str "Figwheel Config Error (in project.clj) - " %)
     (filter identity
