Files
MindSift/frontend/vite.config.ts
T
sandrodachandClaude Opus 5.5 3ca4ff7bce
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m50s
chore: Semantic Versioning and a changelog from now on
Tags become three-part (v0.6.0), the header shows the full version and
pre-release tags no longer move :stable. CHANGELOG.md (Keep a Changelog)
starts with an Unreleased section; older versions will be added from the
history. The quantity field opens the number keypad on phones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 18:55:32 +01:00

31 lines
851 B
TypeScript

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { readFileSync } from 'node:fs';
// Shown in the header. Release builds get the git tag (APP_VERSION build argument, e.g. "v0.6.0");
// other builds show the package version with a "-dev" suffix (Semantic Versioning, see CHANGELOG.md).
const pkg = JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf8'));
const appVersion = process.env.APP_VERSION || `v${pkg.version}-dev`;
export default defineConfig({
plugins: [react()],
define: {
__APP_VERSION__: JSON.stringify(appVersion),
},
server: {
port: 5173,
proxy: {
'/api': {
target: 'http://localhost:8080',
changeOrigin: true,
ws: true,
},
},
},
build: {
outDir: 'dist',
emptyOutDir: true,
sourcemap: false,
},
});