d5a90f6f1d
Reads version from package.json via Vite's define (__APP_VERSION__) and shows it as a small label at the bottom of the sidebar. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
25 lines
491 B
JavaScript
25 lines
491 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(pkg.version),
|
|
},
|
|
build: {
|
|
modulePreload: { polyfill: false },
|
|
},
|
|
server: {
|
|
host: true,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://backend:8000',
|
|
changeOrigin: true,
|
|
}
|
|
}
|
|
}
|
|
})
|