Skip to content

Commit 24055b2

Browse files
authored
Merge pull request #2714 from codefori/webpack/errorIfCopyFails
Throw an error and abort build when file to copy is not found
2 parents cafc6e6 + bdc3c62 commit 24055b2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

webpack.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ for (const file of files) {
3838
// Overwrites by default
3939
fs.copyFileSync(src, dest);
4040
}
41+
else{
42+
throw `File ${src} not found for copy!`
43+
}
4144
}
4245

4346
console.log(``);

0 commit comments

Comments
 (0)