diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts index e65d1bea5..0864785cc 100644 --- a/packages/astro/src/core/build/static-build.ts +++ b/packages/astro/src/core/build/static-build.ts @@ -343,7 +343,7 @@ async function cleanServerOutput(opts: StaticBuildOptions) { // Clean out directly if the outDir is outside of root if (out.toString() !== opts.settings.config.outDir.toString()) { // Copy assets before cleaning directory if outside root - await copyFiles(out, opts.settings.config.outDir); + await copyFiles(out, opts.settings.config.outDir); await fs.promises.rm(out, { recursive: true }); return; }