File tree 1 file changed +9
-11
lines changed
1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change 146
146
((.-resolve (:require @ctx)) libname))))
147
147
(js/Promise.resolve ((.-resolve (:require @ctx)) libname)))
148
148
(.then (fn [path]
149
- (let [file (if (str/starts-with? path " file:" )
150
- (url/fileURLToPath path)
151
- path)
152
- file? (delay (fs/existsSync file))
153
- path* (if (and reload?
149
+ ; ; (prn :path path)
150
+ (let [file-url (if (str/starts-with? path " file:" )
151
+ path
152
+ (when (fs/existsSync path)
153
+ (url/pathToFileURL path)))
154
+ path (if (and reload?
154
155
; ; not "node:fs" etc
155
- @file?)
156
- (str file " ?uuid=" (random-uuid ))
157
- path)
158
- path (if (and windows? @file?)
159
- (str (url/pathToFileURL path*))
160
- path*)]
156
+ file-url)
157
+ (str file-url " ?uuid=" (random-uuid ))
158
+ path)]
161
159
(esm/dynamic-import path))))
162
160
(.then (fn [mod]
163
161
(register-module mod internal-name)
You can’t perform that action at this time.
0 commit comments