@@ -11,3 +11,25 @@ index 0f22881..41cd9ef 100644
1111 calculate(input) {
1212 const root = extractorRegExps.root.exec(toUTF8String(input));
1313 if (root) {
14+ diff --git a/node_modules/astro/dist/core/build/static-build.js b/node_modules/astro/dist/core/build/static-build.js
15+ index 79f476a..afb77e9 100644
16+ --- a/node_modules/astro/dist/core/build/static-build.js
17+ +++ b/node_modules/astro/dist/core/build/static-build.js
18+ @@ -384,7 +384,7 @@ async function ssrMoveAssets(opts, internals, prerenderOutputDir) {
19+ if (!fs.existsSync(currentUrl)) return;
20+ const dir = new URL(path.parse(clientUrl.href).dir);
21+ if (!fs.existsSync(dir)) await fs.promises.mkdir(dir, { recursive: true });
22+ - return fs.promises.rename(currentUrl, clientUrl);
23+ + try { return await fs.promises.rename(currentUrl, clientUrl); } catch (e) { if (e.code === 'EXDEV') { await fs.promises.copyFile(currentUrl, clientUrl); await fs.promises.unlink(currentUrl); } else { throw e; } }
24+ })
25+ );
26+ }
27+ @@ -400,7 +400,7 @@ async function ssrMoveAssets(opts, internals, prerenderOutputDir) {
28+ if (!fs.existsSync(currentUrl)) return;
29+ const dir = new URL(path.parse(clientUrl.href).dir);
30+ if (!fs.existsSync(dir)) await fs.promises.mkdir(dir, { recursive: true });
31+ - return fs.promises.rename(currentUrl, clientUrl);
32+ + try { return await fs.promises.rename(currentUrl, clientUrl); } catch (e) { if (e.code === 'EXDEV') { await fs.promises.copyFile(currentUrl, clientUrl); await fs.promises.unlink(currentUrl); } else { throw e; } }
33+ })
34+ );
35+ removeEmptyDirs(fileURLToPath(serverRoot));
0 commit comments