Skip to content

Commit

Permalink
Fix dot files not being copied over on non-root builds (withastro#9740)
Browse files Browse the repository at this point in the history
When running `astro build` outside of where the astro files are, dotfiles are not copied over because the `includeDotfiles` parameter is not passed in.
  • Loading branch information
taktran committed Jan 19, 2024
1 parent 53c69dc commit 7e0c44c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/slimy-jobs-smash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"astro": patch
---

Fix dot files not being copied over on non-root builds
2 changes: 1 addition & 1 deletion packages/astro/src/core/build/static-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ async function cleanServerOutput(
// 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, true);
await fs.promises.rm(out, { recursive: true });
return;
}
Expand Down

0 comments on commit 7e0c44c

Please sign in to comment.