summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.changeset/wise-wasps-sell.md5
-rw-r--r--packages/astro/src/core/build/static-build.ts13
2 files changed, 15 insertions, 3 deletions
diff --git a/.changeset/wise-wasps-sell.md b/.changeset/wise-wasps-sell.md
new file mode 100644
index 000000000..b2d031087
--- /dev/null
+++ b/.changeset/wise-wasps-sell.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Remove the manifest from the generated files in the `dist/` folder.
diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts
index cd642aca0..86b7740c4 100644
--- a/packages/astro/src/core/build/static-build.ts
+++ b/packages/astro/src/core/build/static-build.ts
@@ -115,7 +115,7 @@ export async function viteBuild(opts: StaticBuildOptions) {
teardown();
}
- // For static builds, the SSR output output won't be needed anymore after page generation.
+ // For static builds, the SSR output won't be needed anymore after page generation.
// We keep track of the names here so we only remove these specific files when finished.
const ssrOutputChunkNames: string[] = [];
for (const output of ssrOutputs) {
@@ -139,7 +139,7 @@ export async function staticBuild(
case settings.config.output === 'static': {
settings.timer.start('Static generate');
await generatePages(opts, internals);
- await cleanServerOutput(opts, ssrOutputChunkNames);
+ await cleanServerOutput(opts, ssrOutputChunkNames, internals);
settings.timer.end('Static generate');
return;
}
@@ -413,10 +413,17 @@ async function cleanStaticOutput(
}
}
-async function cleanServerOutput(opts: StaticBuildOptions, ssrOutputChunkNames: string[]) {
+async function cleanServerOutput(
+ opts: StaticBuildOptions,
+ ssrOutputChunkNames: string[],
+ internals: BuildInternals
+) {
const out = getOutDirWithinCwd(opts.settings.config.outDir);
// The SSR output chunks for Astro are all .mjs files
const files = ssrOutputChunkNames.filter((f) => f.endsWith('.mjs'));
+ if (internals.manifestFileName) {
+ files.push(internals.manifestFileName);
+ }
if (files.length) {
// Remove all the SSR generated .mjs files
await Promise.all(