Skip to content

Commit e1843f0

Browse files
fix(bld): use fs.promises.copyFile to copy app files in build mode with glob enabled
1 parent bd0ef96 commit e1843f0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/bld.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,11 @@ async function bld({
143143

144144
if (glob) {
145145
for (let file of files) {
146-
await fs.promises.cp(
146+
const stats = await fs.promises.stat(file);
147+
if (stats.isDirectory()) {
148+
continue;
149+
}
150+
await fs.promises.copyFile(
147151
file,
148152
path.resolve(
149153
outDir,

0 commit comments

Comments
 (0)