Skip to content

Commit 43052ba

Browse files
committed
support :libs entries that specify a specific file, just use the file, don't
compute the relative location. Note, this does not fix loading of this type of entry at the REPL
1 parent 88eed9a commit 43052ba

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/main/clojure/cljs/closure.clj

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,10 +1133,13 @@
11331133
0)})))))))
11341134

11351135
(defn lib-rel-path [{:keys [lib-path url] :as ijs}]
1136-
(string/replace
1137-
(util/path url)
1138-
(str (io/file (System/getProperty "user.dir") lib-path) File/separator)
1139-
""))
1136+
(let [path (util/path url)]
1137+
(if (.endsWith path ".js")
1138+
(util/get-name url)
1139+
(string/replace
1140+
path
1141+
(str (io/file (System/getProperty "user.dir") lib-path) File/separator)
1142+
""))))
11401143

11411144
(defn ^String rel-output-path
11421145
"Given an IJavaScript which is either in memory, in a jar file,

0 commit comments

Comments
 (0)