This commit is contained in:
2026-04-04 18:59:34 +02:00
parent 4c989928f1
commit 94fb38e038
5 changed files with 6 additions and 6 deletions
+23
View File
@@ -0,0 +1,23 @@
import { defineConfig, loadEnv } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '');
const port = Number(env.PORT || 5173);
const httpsEnabled = env.HTTPS === 'true';
return {
plugins: [react()],
server: {
port,
...(httpsEnabled ? { https: {} } : {}),
strictPort: true,
allowedHosts: ['localhost', 'host.docker.internal', 'frontend'],
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: './vitest.setup.ts',
},
};
});