aaredb/frontend/vite.config.ts
2024-12-10 16:28:44 +01:00

20 lines
509 B
TypeScript

import { defineConfig, loadEnv } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '');
return {
plugins: [
react(),
],
server: {
https: {
key: env.VITE_SSL_KEY_PATH,
cert: env.VITE_SSL_CERT_PATH,
},
host: true, // This allows hosting on network interfaces
port: 5173 // Optional: Specify a custom port (default is 5173)
}}
});