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:
parent
1a669ea646
commit
46fd65d61a
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue