Files
oil-formula-calculator/frontend/vite.config.js
Hera Zhao d3e3b89701
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 6s
PR Preview / deploy-preview (pull_request) Successful in 9s
Test / e2e-test (push) Has been cancelled
UI: 预览环境显示构建时间 + 售价默认299
- 预览栏显示部署时间(如 04/11 10:05)
- 售价默认299
- vite构建时注入__BUILD_TIME__

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 09:56:16 +00:00

25 lines
557 B
JavaScript

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
const buildTime = new Date().toLocaleString('zh-CN', { timeZone: 'Asia/Shanghai', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit' })
export default defineConfig({
define: {
__BUILD_TIME__: JSON.stringify(buildTime),
},
plugins: [vue()],
server: {
proxy: {
'/api': 'http://localhost:8000',
'/uploads': 'http://localhost:8000'
}
},
build: {
outDir: 'dist'
},
test: {
environment: 'jsdom',
globals: true,
}
})