- Remove unused template files (frontend-code-interpreter, template-renderer) - Add home, test1, test2, zh-en-translator pages - Update router configuration - Add Docker and tailwind config - Update environment files and configuration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
34 lines
723 B
TypeScript
34 lines
723 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import path from 'path'
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig(() => {
|
|
return {
|
|
base: './',
|
|
plugins: [tailwindcss(), react()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src')
|
|
}
|
|
},
|
|
optimizeDeps: {
|
|
include: ['dayjs/locale/zh-cn']
|
|
},
|
|
server: {
|
|
host: '0.0.0.0',
|
|
allowedHosts: true as true,
|
|
cors: true,
|
|
open: true,
|
|
port: 5173
|
|
},
|
|
// 生产预览服务器配置 (vite preview) - 仅用于本地测试
|
|
preview: {
|
|
host: '0.0.0.0',
|
|
port: 3000,
|
|
cors: true
|
|
}
|
|
}
|
|
})
|