                  :live-js-deps live-js-deps))
       )))
 
-(defn convert-goog
+(defn convert-goog*
   "convert Closure Library code since it may contain a random mix of ClosureJS and Closure Modules"
-  [{:keys [js-options  mode] :as state} sources]
+  [{:keys [js-options mode] :as state} sources]
   (let [source-files
         (->> (for [{:keys [resource-name] :as src} sources]
                (let [source (data/get-source-code state src)]

        (data/make-closure-compiler)

        co-opts
        (merge
          ;; :whitespace or :simple work but some patterns really require the DCE done by :simple
          ;; eg some conditional imports done by react&friends
          {:pretty-print true
           :pseudo-names false
           ;; es6+ is transformed by babel first
           ;; but closure got real picky and complains about some things being es6 that aren't
           ;; doesn't really impact much here anyways
           :language-in :ecmascript-next
           :language-out :ecmascript5}
          ;; (dissoc js-options :resolve)
          ;; always enable source-map, just skip emitting them later if desired
          {:source-map true})

        generate-source-map?
        (not (false? (:source-map js-options)))


          (.addCustomPass CustomPassExecutionTime/BEFORE_CHECKS replace-require-pass)

          ;; google SourceMapResolver is broken since it always resolves source map files relative
          ;; from the input name not from its original path. since we always use the resource-name
          ;; as the input it can never find anything. can't use the full path as input as that
          ;; affects the generated alias
          (.setResolveSourceMapAnnotations false)

          (.setWarningLevel DiagnosticGroups/NON_STANDARD_JSDOC CheckLevel/OFF)
          (.setWarningLevel DiagnosticGroups/MISPLACED_TYPE_ANNOTATION CheckLevel/OFF)
          ;; node_modules/@firebase/util/dist/cjs/src/constants.ts:26: ERROR - @define variable  assignment must be global
