32 lines
696 B
TypeScript
32 lines
696 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import { resolve } from 'path';
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
host: '127.0.0.1',
|
|
port: 5285,
|
|
allowedHosts: ['club.cocotte.apricot.lan', 'www.cocotte.apricot.lan'],
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:3030',
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/api/, ''),
|
|
},
|
|
'/www': {
|
|
target: 'http://localhost:3030',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve(__dirname, 'src'),
|
|
},
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
sourcemap: false,
|
|
},
|
|
});
|