App version

This commit is contained in:
Kilian Hofmann 2024-07-29 23:09:48 +02:00
parent b455fdb20e
commit 702bb94004
3 changed files with 6 additions and 1 deletions

View File

@ -25,7 +25,7 @@ const Footer: FC = () => {
</Link> </Link>
</Grid> </Grid>
<Grid item xs={12} sx={{ display: 'flex', justifyContent: 'center' }}> <Grid item xs={12} sx={{ display: 'flex', justifyContent: 'center' }}>
<Typography variant="caption">© 2024 Kilian Kurt Hofmann</Typography> <Typography variant="caption">© 2024 Kilian Kurt Hofmann | Build {__APP_VERSION__}</Typography>
</Grid> </Grid>
</Grid> </Grid>
</Box> </Box>

View File

@ -1 +1,3 @@
/// <reference types="vite/client" /> /// <reference types="vite/client" />
declare const __APP_VERSION__: string;

View File

@ -6,6 +6,9 @@ import { defineConfig } from 'vite';
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
plugins: [TanStackRouterVite(), react(), visualizer({ emitFile: true, open: true, filename: 'stats.html' })], plugins: [TanStackRouterVite(), react(), visualizer({ emitFile: true, open: true, filename: 'stats.html' })],
define: {
__APP_VERSION__: JSON.stringify(process.env.npm_package_version),
},
build: { build: {
outDir: '../dist', outDir: '../dist',
emptyOutDir: true, emptyOutDir: true,