0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-30 22:03:56 -05:00

wip: try fileURLToPath

This commit is contained in:
bholmesdev 2024-03-01 14:35:11 -05:00
parent 1a669ea646
commit 46fd65d61a

View file

@ -130,7 +130,7 @@ async function importBundledFile({
const tmpFileUrl = new URL(`db.timestamp-${Date.now()}.mjs`, root); const tmpFileUrl = new URL(`db.timestamp-${Date.now()}.mjs`, root);
await writeFile(tmpFileUrl, code); await writeFile(tmpFileUrl, code);
try { try {
return await import(/* @vite-ignore */ tmpFileUrl.href); return await import(/* @vite-ignore */ fileURLToPath(tmpFileUrl));
} finally { } finally {
try { try {
await unlink(tmpFileUrl); await unlink(tmpFileUrl);