fix: duplicate BuildOutput.publicAssets (#951)

Co-authored-by: Aaron Klinker <aaronklinker1@gmail.com>
This commit is contained in:
1natsu
2024-09-04 02:06:21 +09:00
committed by GitHub
parent eb65d0b42a
commit da0accebe8
@@ -47,14 +47,16 @@ export async function rebuild(
const newOutput = await buildEntrypoints(entrypointGroups, spinner);
const mergedOutput: Omit<BuildOutput, 'manifest'> = {
steps: [...existingOutput.steps, ...newOutput.steps],
publicAssets: [...existingOutput.publicAssets, ...newOutput.publicAssets],
// Do not merge existing because all publicAssets copied everytime
publicAssets: newOutput.publicAssets,
};
const { manifest: newManifest, warnings: manifestWarnings } =
await generateManifest(allEntrypoints, mergedOutput);
const finalOutput: BuildOutput = {
manifest: newManifest,
...newOutput,
...mergedOutput,
};
// Write manifest
@@ -64,14 +66,7 @@ export async function rebuild(
spinner.clear().stop();
return {
output: {
manifest: newManifest,
steps: [...existingOutput.steps, ...finalOutput.steps],
publicAssets: [
...existingOutput.publicAssets,
...finalOutput.publicAssets,
],
},
output: finalOutput,
manifest: newManifest,
warnings: manifestWarnings,
};