Web - Use console.log and Vite Env Variables to show building time on browser console
Create env.d.ts file
cd src
touch env.d.ts
/// <reference types="vite/client" />
interface ImportMetaEnv {
readonly VITE_BUILD_TIME: string;
// more env variables...
}
interface ImportMeta {
readonly env: ImportMetaEnv;
}
Logs at main.tsx
/...
loclv.hashnode.dev1 min read