import { defineConfig } from 'vite' import uni from '@dcloudio/vite-plugin-uni' function padNumber(value) { return String(value).padStart(2, '0') } function createBuildVersion() { const now = new Date() return [ now.getFullYear(), padNumber(now.getMonth() + 1), padNumber(now.getDate()) ].join('') + [ padNumber(now.getHours()), padNumber(now.getMinutes()), padNumber(now.getSeconds()) ].join('') } export default defineConfig(() => { const buildVersion = createBuildVersion() return { base: '/', define: { __APP_BUILD_VERSION__: JSON.stringify(buildVersion) }, build: { outDir: 'dist', }, server: { port: 5173, proxy: { '/admin-api': { target: 'http://47.106.185.127:8089', changeOrigin: true } } }, plugins: [ uni() ], exclude:[ /\/README\.md$/, ] } })