🎥 Make videos programmatically with React
more efficent copy dir
Jonny Burger5bbbb864b414
diff --git a/packages/bundler/src/copy-dir.ts b/packages/bundler/src/copy-dir.tsindex 72565ccc47..5d42bbcf72 100644--- a/packages/bundler/src/copy-dir.ts+++ b/packages/bundler/src/copy-dir.ts@@ -33,8 +33,11 @@ export async function copyDir({onSymlinkDetected(entry, src);await fs.promises.symlink(realpath, destPath);} else {- await fs.promises.copyFile(srcPath, destPath);- copied += fs.statSync(srcPath).size;+ const [, {size}] = await Promise.all([+ fs.promises.copyFile(srcPath, destPath),+ fs.promises.stat(srcPath),+ ]);+ copied += size;onProgress(copied);}}