import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' // https://vite.dev/config/ export default defineConfig({ plugins: [react()], // Use relative paths for assets (works with both HTTP and HTTPS) base: '/', build: { // Ensure assets use relative paths assetsDir: 'assets', rollupOptions: { output: { // Use relative paths for asset imports assetFileNames: 'assets/[name]-[hash][extname]', chunkFileNames: 'assets/[name]-[hash].js', entryFileNames: 'assets/[name]-[hash].js', }, }, }, })