28 lines
656 B
TypeScript
28 lines
656 B
TypeScript
import path from 'path';
|
|
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
|
|
export default defineConfig({
|
|
server: {
|
|
port: 3101,
|
|
host: '0.0.0.0',
|
|
// Im Dev-Modus laeuft das Backend lokal auf 5007; im Betrieb uebernimmt
|
|
// Apache das Weiterreichen von /api an 127.0.0.1:5007.
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://127.0.0.1:5007',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
plugins: [react(), tailwindcss()],
|
|
resolve: {
|
|
alias: { '@': path.resolve(__dirname, './src') },
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
sourcemap: false,
|
|
},
|
|
});
|