(defn
reload-file
[{:keys [request-url], :as file-msg} callback]
(dev-assert (string? request-url) (not (nil? callback)))
(utils/debug-prn (str "FigWheel: Attempting to load " request-url))
((or (gobj/get goog.global "FIGWHEEL_IMPORT_SCRIPT") reload-file*)
request-url
(fn
[success?]
(if
success?
(do
(utils/debug-prn
(str "FigWheel: Successfully loaded " request-url))
(apply callback [(assoc file-msg :loaded-file true)]))
(do
(utils/log
:error
(str "Figwheel: Error loading file " request-url))
(apply callback [file-msg]))))))