fix: stream static files from disk (#1734)

This commit is contained in:
Marvin Hagemeister
2023-09-05 12:12:10 +02:00
committed by GitHub
parent 63c90ddc67
commit c767cc5067
4 changed files with 54 additions and 11 deletions
+2 -2
View File
@@ -26,8 +26,8 @@ export async function build(
const snapshot = await ctx.buildSnapshot();
// Write output files to disk
await Promise.all(snapshot.paths.map((fileName) => {
const data = snapshot.read(fileName);
await Promise.all(snapshot.paths.map(async (fileName) => {
const data = await snapshot.read(fileName);
if (data === null) return;
return Deno.writeFile(join(outDir, fileName), data);