                                                    bo)))))
     build))
 
-
 ;; continuing to append require for the html document case to enable
 ;; document.onload callbacks to work
 (defn esc-fmt [a & args]
   (apply format a (map pr-str args)))
-
-#_(defn document-write-require-lib [munged-ns]
-  (esc-fmt "\ndocument.write(%s);"
-           (esc-fmt "<script>goog.require(%s);</script>" (name munged-ns))))
-
-#_(defn append-require-to-output-to [build munged-ns]
-  (let [output-to (has-output-to? build)
-        line (if (and (has-main? build) (not (node? build)))
-               (str (document-write-require-lib munged-ns))
-               (esc-fmt "\ngoog.require(%s);"   munged-ns))]
-    (when (and output-to (.exists (io/file output-to)))
-      (spit output-to line :append true))))
 
 (defn document-write-src-script [src]
   (esc-fmt "\ndocument.write(%s);"

    (build-fn
     (assoc build-state
            :build-config (add-connect-script! figwheel-server build-config)))
    (append-connection-init! build-config)))


(defn- has-output-to? [build]
  (get-in build [:build-options :output-to]))

(defn add-connect-script! [figwheel-server build]
  ;; cannot just supply arbitrary connection code to the compiler because of the following issues
