AnCao/web/vite.config.ts
yanlongqi 4f95514af8 添加打印试卷页面的职位填写横线
- 在姓名后面添加职位的填写横线:职位:________________
- 调整试卷头部布局,从三栏改为四栏(日期、姓名、职位、成绩)
- 使用flex布局确保各元素合理分布和对齐

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 22:38:36 +08:00

44 lines
1.1 KiB
TypeScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import path from 'path'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
base: './', // 使用相对路径,确保打包后资源路径正确
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
css: {
preprocessorOptions: {
less: {
javascriptEnabled: true,
// antd 主题定制 - 白色毛玻璃风格
modifyVars: {
'@primary-color': '#007aff', // macOS 蓝色
'@link-color': '#007aff', // 链接色
'@border-radius-base': '12px', // 组件圆角
'@layout-body-background': '#ffffff', // 白色背景
'@component-background': 'rgba(255, 255, 255, 0.8)', // 半透明组件背景
'@border-color-base': 'rgba(0, 0, 0, 0.06)', // 边框色
},
},
},
},
server: {
port: 3000,
proxy: {
'/api': {
target: 'https://ankao.yuchat.top',
changeOrigin: true,
},
},
},
build: {
outDir: 'dist',
assetsDir: 'assets',
},
})