feat: 鏍囬鏍忕増鏈彿 + 搴旂敤甯傚満涓婃灦鏃ュ巻搴旂敤涓庡垎缁勬姌鍙?+ 鏃ョ▼鍐滃巻/琛ㄥ崟妯増浼樺寲 + 涓汉璧勬枡寮圭獥

This commit is contained in:
2026-08-23 08:55:08 +08:00
parent 62776aa33b
commit 66f107058e
22 changed files with 545 additions and 29 deletions
+7
View File
@@ -1,9 +1,16 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { readFileSync } from 'node:fs';
// 以 package.json 的 version 作为客户端版本号唯一来源,注入到前端
const pkg = JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf-8'));
// 浏览器调试与 Electron 开发共用
export default defineConfig({
plugins: [react()],
define: {
__APP_VERSION__: JSON.stringify(pkg.version),
},
base: './',
server: {
port: 5173,