From e1843f00c6f2ec389933565ba0b3975c2c93bc23 Mon Sep 17 00:00:00 2001 From: Ayushman Chhabra <14110965+ayushmanchhabra@users.noreply.github.com> Date: Mon, 25 Nov 2024 20:10:12 +0530 Subject: [PATCH] fix(bld): use fs.promises.copyFile to copy app files in build mode with glob enabled --- src/bld.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bld.js b/src/bld.js index a752befc..f931ccc3 100644 --- a/src/bld.js +++ b/src/bld.js @@ -143,7 +143,11 @@ async function bld({ if (glob) { for (let file of files) { - await fs.promises.cp( + const stats = await fs.promises.stat(file); + if (stats.isDirectory()) { + continue; + } + await fs.promises.copyFile( file, path.resolve( outDir,