diff --git a/exam/react/src/components/Footer/Footer.tsx b/exam/react/src/components/Footer/Footer.tsx index 59845b3..86ce13e 100644 --- a/exam/react/src/components/Footer/Footer.tsx +++ b/exam/react/src/components/Footer/Footer.tsx @@ -25,7 +25,7 @@ const Footer: FC = () => { - © 2024 Kilian Kurt Hofmann + © 2024 Kilian Kurt Hofmann | Build {__APP_VERSION__} diff --git a/exam/react/src/vite-env.d.ts b/exam/react/src/vite-env.d.ts index 11f02fe..dbb4c62 100644 --- a/exam/react/src/vite-env.d.ts +++ b/exam/react/src/vite-env.d.ts @@ -1 +1,3 @@ /// + +declare const __APP_VERSION__: string; diff --git a/exam/react/vite.config.ts b/exam/react/vite.config.ts index f254943..8a822ac 100644 --- a/exam/react/vite.config.ts +++ b/exam/react/vite.config.ts @@ -6,6 +6,9 @@ import { defineConfig } from 'vite'; // https://vitejs.dev/config/ export default defineConfig({ plugins: [TanStackRouterVite(), react(), visualizer({ emitFile: true, open: true, filename: 'stats.html' })], + define: { + __APP_VERSION__: JSON.stringify(process.env.npm_package_version), + }, build: { outDir: '../dist', emptyOutDir: true,