Performance: OPcache, gzip, font subsetting, lazy-loaded pages
- Enable PHP OPcache in Docker (256MB, dev-friendly settings) - Enable gzip compression in nginx + immutable caching for /build/ assets - Reduce fonts to latin-only subsets (from 28 files to ~6) - Lazy-load Vue pages via dynamic imports (D3 no longer loaded on login) - MetroMap chunk split out separately (62KB only when needed) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,14 @@ server {
|
||||
|
||||
charset utf-8;
|
||||
|
||||
# Gzip compression
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_proxied any;
|
||||
gzip_comp_level 6;
|
||||
gzip_types text/plain text/css text/xml application/json application/javascript application/xml+rss application/atom+xml image/svg+xml;
|
||||
gzip_min_length 1000;
|
||||
|
||||
# Handle static files directly
|
||||
location ~* \.(css|js|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot|map)$ {
|
||||
expires max;
|
||||
@@ -14,6 +22,12 @@ server {
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location /build/ {
|
||||
expires max;
|
||||
add_header Cache-Control "public, immutable";
|
||||
gzip_static on;
|
||||
}
|
||||
|
||||
# Laravel routing — try files, then directories, then pass to index.php
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
|
||||
Reference in New Issue
Block a user