Skip to content

Commit 2bb2d0b

Browse files
committed
CLJS-876: merged sourcemap doesn't account for output-wrapper
1 parent 06c98fc commit 2bb2d0b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/clj/cljs/closure.clj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,8 @@ should contain the source for the given namespace name."
905905
sources name
906906
(assoc opts
907907
:preamble-line-count
908-
(- (count (.split #"\r?\n" (make-preamble opts) -1)) 1)))))
908+
(+ (- (count (.split #"\r?\n" (make-preamble opts) -1)) 1)
909+
(if (:output-wrapper opts) 1 0))))))
909910
source)
910911
(report-failure result))))
911912

@@ -1072,7 +1073,8 @@ should contain the source for the given namespace name."
10721073
{:source-map sm-name
10731074
:preamble-line-count
10741075
(if (= name :cljs-base)
1075-
(- (count (.split #"\r?\n" (make-preamble opts) -1)) 1)
1076+
(+ (- (count (.split #"\r?\n" (make-preamble opts) -1)) 1)
1077+
(if (:output-wrapper opts) 1 0))
10761078
0)
10771079
:foreign-deps-line-count
10781080
(if fdeps-str

0 commit comments

Comments
 (0)