Fix: Add trust proxy for reverse proxy and fix asset paths for HTTPS
This commit is contained in:
@@ -4,4 +4,18 @@ 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',
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user