|
518 | 518 | (let [relpath (str path ".cljc")]
|
519 | 519 | (if-let [cljc-res (io/resource relpath)]
|
520 | 520 | {:relative-path relpath :uri cljc-res}
|
521 |
| - (let [ijs (get-in @compiler-env [:js-dependency-index (str ns)]) |
522 |
| - relpath (or (:file ijs) (:url ijs))] |
523 |
| - (if-let [js-res (and relpath |
| 521 | + (let [relpath (str path ".js")] |
| 522 | + (if-let [js-res (io/resource relpath)] |
| 523 | + {:relative-path relpath :uri js-res} |
| 524 | + (let [ijs (get-in @compiler-env [:js-dependency-index (str ns)]) |
| 525 | + relpath (or (:file ijs) (:url ijs))] |
| 526 | + (if-let [js-res (and relpath |
524 | 527 | ;; try to parse URL, otherwise just return local
|
525 | 528 | ;; resource
|
526 | 529 | (or (and (util/url? relpath) relpath)
|
527 |
| - (try (URL. relpath) (catch Throwable t)) |
528 |
| - (io/resource relpath)))] |
529 |
| - {:relative-path relpath :uri js-res} |
530 |
| - (throw |
531 |
| - (IllegalArgumentException. |
532 |
| - (str "Namespace " ns " does not exist")))))))))) |
| 530 | + (try (URL. relpath) (catch Throwable t)) |
| 531 | + (io/resource relpath)))] |
| 532 | + {:relative-path relpath :uri js-res} |
| 533 | + (throw |
| 534 | + (IllegalArgumentException. |
| 535 | + (str "Namespace " ns " does not exist")))))))))))) |
533 | 536 |
|
534 | 537 | (defn cljs-dependencies
|
535 | 538 | "Given a list of all required namespaces, return a list of
|
|
0 commit comments