mirror of
https://github.com/efiten/coredrive-rx.git
synced 2026-11-24 21:37:58 +00:00
Shows the running build next to the title. Versioning scheme: patch=fix/tweak, minor=new backward-compatible feature, major=breaking (e.g. MQTT contract) or first stable release.
12 lines
347 B
JavaScript
12 lines
347 B
JavaScript
import { defineConfig } from 'vite';
|
|
import { readFileSync } from 'fs';
|
|
|
|
// Inject the package.json version so the app can display which build is running.
|
|
const pkg = JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf8'));
|
|
|
|
export default defineConfig({
|
|
define: {
|
|
__APP_VERSION__: JSON.stringify(pkg.version),
|
|
},
|
|
});
|