Open Hill-98 opened 6 months ago
new URL(".", import.meta.url).pathname will return /C:/xxxx.js/ on Windows, let's use the correct method to get the __dirname on all platforms.
new URL(".", import.meta.url).pathname
/C:/xxxx.js/
__dirname
new URL(".", import.meta.url).pathname
will return/C:/xxxx.js/
on Windows, let's use the correct method to get the__dirname
on all platforms.