chore(vite): remove PostCSS, route HMR through app.nimuli.com
Tailwind v4 uses its own Vite plugin — PostCSS/autoprefixer not needed. Nginx now proxies Vite dev paths to host:5173 so HMR works without a separate vite.nimuli.com proxy host. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>main
parent
ea9274be49
commit
2924ec4bf6
|
|
@ -8,6 +8,8 @@ services:
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
extra_hosts:
|
||||||
|
- "host.docker.internal:host-gateway"
|
||||||
|
|
||||||
app:
|
app:
|
||||||
build:
|
build:
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,30 @@ server {
|
||||||
access_log /var/log/nginx/app.nimuli.com.access.log;
|
access_log /var/log/nginx/app.nimuli.com.access.log;
|
||||||
error_log /var/log/nginx/app.nimuli.com.error.log;
|
error_log /var/log/nginx/app.nimuli.com.error.log;
|
||||||
|
|
||||||
|
# Vite Dev-Server (npm run dev läuft auf Host-Port 5173)
|
||||||
|
location ~ ^/(@vite|@id|@fs|node_modules|resources/(css|js)|__vite_ping|__open-in-editor) {
|
||||||
|
proxy_pass http://host.docker.internal:5173;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto https;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
proxy_read_timeout 86400;
|
||||||
|
proxy_send_timeout 86400;
|
||||||
|
}
|
||||||
|
|
||||||
|
# HMR-WebSocket fallback
|
||||||
|
location /vite-hmr {
|
||||||
|
proxy_pass http://host.docker.internal:5173;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_read_timeout 86400;
|
||||||
|
}
|
||||||
|
|
||||||
# Static assets — 1y cache for hashed builds
|
# Static assets — 1y cache for hashed builds
|
||||||
location ~* ^/build/ {
|
location ~* ^/build/ {
|
||||||
proxy_pass http://app:80;
|
proxy_pass http://app:80;
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -10,13 +10,11 @@
|
||||||
"@tailwindcss/forms": "^0.5.2",
|
"@tailwindcss/forms": "^0.5.2",
|
||||||
"@tailwindcss/vite": "^4.3.0",
|
"@tailwindcss/vite": "^4.3.0",
|
||||||
"alpinejs": "^3.15.12",
|
"alpinejs": "^3.15.12",
|
||||||
"autoprefixer": "^10.4.2",
|
|
||||||
"axios": "^1.11.0",
|
"axios": "^1.11.0",
|
||||||
"chart.js": "^4.5.1",
|
"chart.js": "^4.5.1",
|
||||||
"concurrently": "^9.0.1",
|
"concurrently": "^9.0.1",
|
||||||
"laravel-echo": "^2.3.4",
|
"laravel-echo": "^2.3.4",
|
||||||
"laravel-vite-plugin": "^2.0.0",
|
"laravel-vite-plugin": "^2.0.0",
|
||||||
"postcss": "^8.4.31",
|
|
||||||
"pusher-js": "^8.5.0",
|
"pusher-js": "^8.5.0",
|
||||||
"qrcode-svg": "^1.1.0",
|
"qrcode-svg": "^1.1.0",
|
||||||
"tailwindcss": "^3.1.0",
|
"tailwindcss": "^3.1.0",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
export default {
|
|
||||||
plugins: {
|
|
||||||
tailwindcss: {},
|
|
||||||
autoprefixer: {},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
@ -14,17 +14,13 @@ export default defineConfig({
|
||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
port: 5173,
|
port: 5173,
|
||||||
strictPort: true,
|
strictPort: true,
|
||||||
cors: {
|
cors: true,
|
||||||
origin: [/https:\/\/app\.nimuli\.com$/, /https:\/\/nimu\.li$/],
|
origin: 'https://app.nimuli.com',
|
||||||
},
|
|
||||||
hmr: {
|
hmr: {
|
||||||
host: 'vite.nimuli.com',
|
host: 'app.nimuli.com',
|
||||||
clientPort: 443,
|
clientPort: 443,
|
||||||
protocol: 'wss',
|
protocol: 'wss',
|
||||||
},
|
},
|
||||||
allowedHosts: ['vite.nimuli.com', 'app.nimuli.com', 'localhost'],
|
allowedHosts: ['app.nimuli.com', 'localhost', '10.10.90.142'],
|
||||||
watch: {
|
|
||||||
ignored: ['**/storage/framework/views/**'],
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue