Added warning when running in production
This commit is contained in:
parent
085ad25348
commit
db38859bf8
File diff suppressed because one or more lines are too long
|
@ -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}`);
|
||||
|
|
Loading…
Reference in New Issue