Skip to content

Commit 33857d4

Browse files
committed
impr(frontend): reduce json minification logs on build
!nuf
1 parent cac8835 commit 33857d4

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

frontend/vite.config.prod.js

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -197,30 +197,29 @@ export default {
197197
totalOriginalSize += originalSize;
198198
totalMinifiedSize += minifiedSize;
199199

200-
const savings =
201-
((originalSize - minifiedSize) / originalSize) * 100;
202-
203200
writeFileSync(sourcePath, minifiedContent);
204201

205-
console.log(
206-
`\x1b[0m \x1b[36m${sourcePath}\x1b[0m | ` +
207-
`\x1b[90mOriginal: ${originalSize} bytes\x1b[0m | ` +
208-
`\x1b[90mMinified: ${minifiedSize} bytes\x1b[0m | ` +
209-
`\x1b[32mSavings: ${savings.toFixed(2)}%\x1b[0m`
210-
);
202+
// const savings =
203+
// ((originalSize - minifiedSize) / originalSize) * 100;
204+
// console.log(
205+
// `\x1b[0m \x1b[36m${sourcePath}\x1b[0m | ` +
206+
// `\x1b[90mOriginal: ${originalSize} bytes\x1b[0m | ` +
207+
// `\x1b[90mMinified: ${minifiedSize} bytes\x1b[0m | ` +
208+
// `\x1b[32mSavings: ${savings.toFixed(2)}%\x1b[0m`
209+
// );
211210
}
212211
});
213212
};
214213

215-
console.log("\n\x1b[1mMinifying JSON files...\x1b[0m\n");
214+
// console.log("\n\x1b[1mMinifying JSON files...\x1b[0m\n");
216215

217216
minifyJsonFiles("./dist");
218217

219218
const totalSavings =
220219
((totalOriginalSize - totalMinifiedSize) / totalOriginalSize) * 100;
221220

222221
console.log(
223-
`\n\x1b[1mMinification Summary:\x1b[0m\n` +
222+
`\n\n\x1b[1mJSON Minification Summary:\x1b[0m\n` +
224223
` \x1b[90mTotal original size: ${(
225224
totalOriginalSize /
226225
1024 /

0 commit comments

Comments
 (0)