Replace hardcoded version strings with build-time injection: - Frontend: Vite __APP_VERSION__ from env or package.json - Backend: APP_VERSION env var exposed via /health endpoint - Docker: build arg propagated through both stages - CI: release workflow extracts version from git tag Document branching strategy and release process in CONTRIBUTING.md. Catch up CHANGELOG with v0.2.0 and Unreleased sections. Sync package.json version to 0.3.0.
25 lines
564 B
JavaScript
25 lines
564 B
JavaScript
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import { readFileSync } from 'fs'
|
|
|
|
const pkg = JSON.parse(readFileSync('./package.json', 'utf-8'))
|
|
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
define: {
|
|
__APP_VERSION__: JSON.stringify(process.env.VITE_APP_VERSION || pkg.version),
|
|
},
|
|
server: {
|
|
port: 3000,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:8000',
|
|
changeOrigin: true
|
|
},
|
|
'/health': {
|
|
target: 'http://localhost:8000',
|
|
changeOrigin: true
|
|
}
|
|
}
|
|
}
|
|
})
|