feat: Implement Phase 5 optimization and best practices

This commit is contained in:
gpt-engineer-app[bot]
2025-10-13 22:56:47 +00:00
parent 68a2572c23
commit 3e520e1520
14 changed files with 341 additions and 165 deletions

20
src/lib/logger.ts Normal file
View File

@@ -0,0 +1,20 @@
/**
* Logger Utility
*
* Provides conditional logging based on environment.
* Prevents console noise in production builds.
*/
const isDev = import.meta.env.DEV;
export const logger = {
log: (...args: any[]) => {
if (isDev) console.log(...args);
},
error: (...args: any[]) => {
console.error(...args); // Always log errors
},
warn: (...args: any[]) => {
if (isDev) console.warn(...args);
},
};