Skip to content

Commit

Permalink
fix: add timestamp in html
Browse files Browse the repository at this point in the history
  • Loading branch information
spaenleh committed Feb 8, 2024
1 parent 222b4f9 commit d83ebe7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
7 changes: 5 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand All @@ -8,7 +8,10 @@
name="description"
content="Knowledge sharing without borders. Communicate, Collaborate, Build Engaging Learning Experiences"
/>
<meta name="version-info" content="%VITE_VERSION%" />
<meta
name="version-info"
content="%VITE_VERSION% @ %VITE_BUILD_TIMESTAMP%"
/>
<!-- Load Roboto font from Google fonts -->
<link
rel="stylesheet"
Expand Down
7 changes: 6 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ import istanbul from 'vite-plugin-istanbul';

// https://vitejs.dev/config/
export default ({ mode }: { mode: string }): UserConfigExport => {
process.env = { ...process.env, ...loadEnv(mode, process.cwd()) };
process.env = {
VITE_VERSION: 'default',
VITE_BUILD_TIMESTAMP: new Date().toISOString(),
...process.env,
...loadEnv(mode, process.cwd()),
};

return defineConfig({
base: '',
Expand Down

0 comments on commit d83ebe7

Please sign in to comment.