                 ;; will mess up source maps otherwise
                 ;; append is fine
                 final-output
-                (str prepend
-                     (when (and any-shadow-js? goog-base)
+                (str (when (and any-shadow-js? goog-base)
                        "var shadow$provide = {};\n")
+                     prepend
                      shadow-js-prepend
                      output
                      append

          src-map-file
          (io/file (str (.getAbsolutePath js-file) ".map"))

          source-map-json
          (or source-map-json
              (let [sm-opts


(defn generate-source-map
  [state
   {:keys [resource-name output-name file input] :as src}
   {:keys [source source-map source-map-json] :as output}
   js-file
   prepend]
