mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 12:52:26 +00:00
fix(build): fail build if critical files are missing in dist
- Updates `scripts/build-dist.mjs` to exit with error code 1 if source files like `_redirects` or `_headers` are missing. - Prevents silent failures where `dist` directory is incomplete, potentially causing Netlify deployment checks to fail ambiguously. - Ensures `build:css` failure also terminates the build process explicitly. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
6ffc53079c
commit
b594a87ef2
1 file changed
+2
-1
@@ -38,7 +38,8 @@ function copyFile(src, dest) {
|
||||
if (fs.existsSync(src)) {
|
||||
fs.copyFileSync(src, dest);
|
||||
} else {
|
||||
console.warn(`Warning: Source file ${src} does not exist.`);
|
||||
console.error(`Error: Source file ${src} does not exist.`);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user