fix(nginx): allow Vite dev dependencies in development mode

- Changed regex /\. to /\.(git|svn|htaccess|htpasswd|env) to allow .vite directory
- Removed node_modules from nginx blocked paths for Vite dependency serving
- Set VITE_ALLOWED_HOSTS=all in development mode for Docker networking

Fixes issue where nginx was blocking Vite's pre-bundled dependencies in
/node_modules/.vite/deps/, causing 404 errors for React and other imports.
This commit is contained in:
Radosław Gierwiało
2025-12-03 19:21:52 +01:00
parent f6fd983c68
commit d8d04adfc6
2 changed files with 6 additions and 4 deletions

View File

@@ -63,7 +63,7 @@ services:
environment:
- NODE_ENV=development
- VITE_HOST=0.0.0.0
- VITE_ALLOWED_HOSTS=${VITE_ALLOWED_HOSTS:-localhost,spotlight.cam,.spotlight.cam}
- VITE_ALLOWED_HOSTS=${VITE_ALLOWED_HOSTS:-all}
stdin_open: true
tty: true
command: npm run dev