Skip to content

Commit 2248baf

Browse files
committed
decomplect the npm_deps.js generation from output-unoptimized
1 parent d30fa77 commit 2248baf

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/main/clojure/cljs/closure.clj

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2198,9 +2198,6 @@
21982198
(when (:debug-inputs opts)
21992199
(util/debug-prn "DEBUG: all compiler inputs")
22002200
(util/debug-prn (pr-str sources)))
2201-
(when (bundle? opts)
2202-
(spit (io/file (util/output-directory opts) "npm_deps.js")
2203-
(npm-deps-js (:node-module-index @env/*compiler*))))
22042201
(cond
22052202
modules
22062203
(let [modules' (module-graph/expand-modules modules sources)]
@@ -3175,7 +3172,11 @@
31753172
(str fdeps-str)
31763173
(add-header opts)
31773174
(output-one-file opts)))))
3178-
(apply output-unoptimized opts js-sources))]
3175+
(do
3176+
(when (bundle? opts)
3177+
(spit (io/file (util/output-directory opts) "npm_deps.js")
3178+
(npm-deps-js (:node-module-index @env/*compiler*))))
3179+
(apply output-unoptimized opts js-sources)))]
31793180
(output-bootstrap opts)
31803181
(when (bundle? opts)
31813182
(when-let [cmd (and (= :none optim)

0 commit comments

Comments
 (0)