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:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-01-30 00:05:09 +00:00
1 parent 6ffc53079c
commit b594a87ef2
1 file changed
+2 -1
+2 -1
View File
@@ -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);
}
}