Skip to content

Commit

Permalink
only need to copy one thing I guess
Browse files Browse the repository at this point in the history
copying all made source maps gigantic since all contained all
sources instead of just the file itself.
  • Loading branch information
thheller committed Sep 2, 2020
1 parent be240d3 commit 85e588a
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/main/shadow/build/closure.clj
Expand Up @@ -1382,18 +1382,12 @@
;; FIXME: should open a proper closure-compiler issue about this
(defn reset-but-keep-files [source-map]
(let [gen (get-field-value source-map "generator")
sfm (get-field-value gen "sourceFileMap")
sfm-copy (LinkedHashMap. sfm)
sfcm (get-field-value gen "sourceFileContentMap")
sfcm-copy (LinkedHashMap. sfcm)
om (get-field-value gen "originalNameMap")
om-copy (LinkedHashMap. om)]
sfcm-copy (LinkedHashMap. sfcm)]

(.reset source-map)

(set-field-value gen "sourceFileMap" sfm-copy)
(set-field-value gen "sourceFileContentMap" sfcm-copy)
(set-field-value gen "originalNameMap" om-copy)))
(set-field-value gen "sourceFileContentMap" sfcm-copy)))

(defn convert-sources*
"takes a list of :js sources and rewrites them to using closure
Expand Down

0 comments on commit 85e588a

Please sign in to comment.