Added warning when running in production

This commit is contained in:
Shahan Nedadahandeh 2022-06-01 22:59:03 -07:00
parent 085ad25348
commit db38859bf8
Signed by: snedadah
GPG Key ID: 8638C7F917385B01
2 changed files with 5 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -98,6 +98,10 @@ export async function optimizeImages() {
if (alreadyOptimizedImageHashes.has(fileHash)) {
console.log(`Skipping ${imagePath}`);
return;
} else if (process.env.NODE_ENV == "production") {
console.warn(
`New image found to optimize: ${imagePath} Please run npm run build:images locally!`
);
}
console.log(`Optimizing file ${imagePath}`);