diff --git a/nginx.conf b/nginx.conf index f5d0bc6..5195bb4 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,12 +1,9 @@ server { listen 80; - - # Use 'alias' to map the specific sub-path + + # Redirect traffic from /lab/data-dashboard/ to your index.html location /lab/data-dashboard/ { alias /usr/share/nginx/html/; try_files $uri $uri/ /index.html; } - - gzip on; - gzip_types text/css application/javascript application/json; } \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index 878ada6..ec14640 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -2,6 +2,9 @@ import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; export default defineConfig({ - base: '/lab/data-dashboard/', // This tells Vite to prepend this to all paths + base: '/lab/data-dashboard/', // Essential: This fixes the asset 404s plugins: [react()], + worker: { + format: 'es', + }, }); \ No newline at end of file