mirror of
https://github.com/Horizontal42/summarum.git
synced 2026-11-10 23:51:59 +03:00
🧹 [code health improvement] Suppress console logs in production
Co-authored-by: Horizontal42 <75383519+Horizontal42@users.noreply.github.com>
This commit is contained in:
parent
bede889ced
commit
63809c0597
2 changed files with 10 additions and 3 deletions
|
|
@ -1,5 +1,11 @@
|
||||||
export const logger = {
|
export const logger = {
|
||||||
info: (...args: any[]) => console.info(...args),
|
info: (...args: any[]) => {
|
||||||
warn: (...args: any[]) => console.warn(...args),
|
if (!import.meta.env.PROD) console.info(...args);
|
||||||
error: (...args: any[]) => console.error(...args),
|
},
|
||||||
|
warn: (...args: any[]) => {
|
||||||
|
if (!import.meta.env.PROD) console.warn(...args);
|
||||||
|
},
|
||||||
|
error: (...args: any[]) => {
|
||||||
|
if (!import.meta.env.PROD) console.error(...args);
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
1
src/vite-env.d.ts
vendored
Normal file
1
src/vite-env.d.ts
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
/// <reference types="vite/client" />
|
||||||
Loading…
Add table
Reference in a new issue