Files
echo/vite.config.js

14 lines
390 B
JavaScript
Raw Normal View History

import { defineConfig } from 'vite'
2025-11-24 17:23:46 +08:00
import vue from '@vitejs/plugin-vue'
// 从 package.json 注入版本号,供前端设置页展示。
// eslint-disable-next-line no-undef
const appVersion = (process && process.env && process.env.npm_package_version) || '0.0.0'
2025-11-24 17:23:46 +08:00
export default defineConfig({
plugins: [vue()],
define: {
__APP_VERSION__: JSON.stringify(appVersion),
},
2025-11-24 17:23:46 +08:00
})