       empty-rc
 
       :else
-      (let [{:keys [browser-overrides package-dir] :as pkg}
+      (let [{:keys [browser-overrides ^File package-dir] :as pkg}
             (find-package-for-file npm file)
 
             ;; the package may have "browser":{"./a":"./b"} overrides

        file
        (test-file rel-dir require)

        file
        (cond
          (not file)
          (test-file-exts npm rel-dir require)

                 (remove nil?)
                 (into []))

            [entry ^File entry-file]
            (or (reduce
                  (fn [_ entry]
                    ;; test file exts first, so we don't pick a directory over a file
