import { defineConfig } from 'vite' export default defineConfig({ // Vite配置选项 server: { port: 3000, open: false, host: false, cors: true, headers: { 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, OPTIONS', 'Access-Control-Allow-Headers': 'Content-Type, Authorization, Range', 'Access-Control-Allow-Credentials': 'true', 'Access-Control-Expose-Headers': 'Content-Length, Content-Range' }, proxy: { '/DocServer': { target: 'http://192.168.1.201:8080', changeOrigin: true, secure: false, rewrite: (path) => path.replace(/^\/DocServer/, '/DocServer') } } }, build: { outDir: 'dist', assetsDir: 'assets' } })