diff options
author | 2023-08-16 09:20:38 -0500 | |
---|---|---|
committer | 2023-08-16 09:20:38 -0500 | |
commit | 7177f7579b6e866f0fd895b3fd079d8ba330b1a9 (patch) | |
tree | cd3d97ecb080038d250dc8e07f76783de9a571bb | |
parent | 0ad6a5e2d81813d7927062ce8ec39b94539e3d2e (diff) | |
download | astro-7177f7579b6e866f0fd895b3fd079d8ba330b1a9.tar.gz astro-7177f7579b6e866f0fd895b3fd079d8ba330b1a9.tar.zst astro-7177f7579b6e866f0fd895b3fd079d8ba330b1a9.zip |
Cleanup dotfiles in dist (#8092)
* fix(#7933, plt-789): cleanup dotfiles during build
* chore: add changeset
Diffstat (limited to '')
-rw-r--r-- | .changeset/eleven-wasps-teach.md | 5 | ||||
-rw-r--r-- | packages/astro/src/core/build/static-build.ts | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/.changeset/eleven-wasps-teach.md b/.changeset/eleven-wasps-teach.md new file mode 100644 index 000000000..3a0993f49 --- /dev/null +++ b/.changeset/eleven-wasps-teach.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Ensure dotfiles are cleaned during static builds diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts index 28f496d91..896d771ac 100644 --- a/packages/astro/src/core/build/static-build.ts +++ b/packages/astro/src/core/build/static-build.ts @@ -352,6 +352,8 @@ async function cleanServerOutput(opts: StaticBuildOptions) { // The SSR output is all .mjs files, the client output is not. const files = await glob('**/*.mjs', { cwd: fileURLToPath(out), + // Important! Also cleanup dotfiles like `node_modules/.pnpm/**` + dot: true, }); if (files.length) { // Remove all the SSR generated .mjs files |