From 1d1b941adc7db0a6bd2eca8561744d4213f98def Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Thu, 7 Nov 2024 20:29:23 +0100 Subject: [PATCH] tweak --- src/nbb/core.cljs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nbb/core.cljs b/src/nbb/core.cljs index 4615544..3d7f795 100644 --- a/src/nbb/core.cljs +++ b/src/nbb/core.cljs @@ -149,10 +149,10 @@ (fn [_] ((.-resolve (:require @ctx)) libname)))) (js/Promise.resolve ((.-resolve (:require @ctx)) libname))) - (.then (fn [path] + (.then (fn [path] (let [file-url (if (str/starts-with? (str path) "file:") path - (when (fs/existsSync path) + (when (and (or windows? reload?) (fs/existsSync path)) (str (url/pathToFileURL path)))) path (if (and reload? ;; not "node:fs" etc