Skip to content

Commit 7177f75

Browse files
authored
Cleanup dotfiles in dist (#8092)
* fix(#7933, plt-789): cleanup dotfiles during build * chore: add changeset
1 parent 0ad6a5e commit 7177f75

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.changeset/eleven-wasps-teach.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'astro': patch
3+
---
4+
5+
Ensure dotfiles are cleaned during static builds

packages/astro/src/core/build/static-build.ts

+2
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,8 @@ async function cleanServerOutput(opts: StaticBuildOptions) {
352352
// The SSR output is all .mjs files, the client output is not.
353353
const files = await glob('**/*.mjs', {
354354
cwd: fileURLToPath(out),
355+
// Important! Also cleanup dotfiles like `node_modules/.pnpm/**`
356+
dot: true,
355357
});
356358
if (files.length) {
357359
// Remove all the SSR generated .mjs files

0 commit comments

Comments
 (0)