mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
Cleanup dotfiles in dist (#8092)
* fix(#7933, plt-789): cleanup dotfiles during build * chore: add changeset
This commit is contained in:
parent
0ad6a5e2d8
commit
7177f7579b
2 changed files with 7 additions and 0 deletions
5
.changeset/eleven-wasps-teach.md
Normal file
5
.changeset/eleven-wasps-teach.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'astro': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Ensure dotfiles are cleaned during static builds
|
|
@ -352,6 +352,8 @@ async function cleanServerOutput(opts: StaticBuildOptions) {
|
||||||
// The SSR output is all .mjs files, the client output is not.
|
// The SSR output is all .mjs files, the client output is not.
|
||||||
const files = await glob('**/*.mjs', {
|
const files = await glob('**/*.mjs', {
|
||||||
cwd: fileURLToPath(out),
|
cwd: fileURLToPath(out),
|
||||||
|
// Important! Also cleanup dotfiles like `node_modules/.pnpm/**`
|
||||||
|
dot: true,
|
||||||
});
|
});
|
||||||
if (files.length) {
|
if (files.length) {
|
||||||
// Remove all the SSR generated .mjs files
|
// Remove all the SSR generated .mjs files
|
||||||
|
|
Loading…
Reference in a new issue