22 lines
478 B
TypeScript
22 lines
478 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
// 浏览器调试与 Electron 开发共用
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
base: './',
|
|
server: {
|
|
port: 5173,
|
|
host: '127.0.0.1',
|
|
proxy: {
|
|
'/api': 'http://localhost:3000',
|
|
'/uploads': 'http://localhost:3000',
|
|
'/socket.io': { target: 'http://localhost:3000', ws: true },
|
|
},
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
emptyOutDir: true,
|
|
},
|
|
});
|