feat: 添加炫彩更新提示~

This commit is contained in:
2025-09-09 21:10:41 +08:00
parent fb4dc7fa83
commit 64fb077d65
4 changed files with 158 additions and 19 deletions

View File

@@ -2,6 +2,9 @@ import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
// 读取package.json中的版本号
const packageJson = require('./package.json')
// https://vite.dev/config/
export default defineConfig({
plugins: [vue()],
@@ -12,4 +15,8 @@ export default defineConfig({
'@': path.resolve(__dirname, './src'),
},
},
define: {
// 在编译时将版本号注入到环境变量中
'import.meta.env.VITE_APP_VERSION': JSON.stringify(packageJson.version)
}
})