server { listen 3000; root /usr/share/nginx/html; index index.html; location / { # adapter-static writes prerendered routes as flat .html # files (e.g. /dashboards -> dashboards.html, confirmed by # actually inspecting the build output), not /index.html -- # $uri.html has to be in this chain or a request for exactly # "/dashboards" falls straight through to the SPA fallback and # skips the prerendered page it should be serving. 200.html (not # index.html) is the fallback shell for genuinely dynamic routes # (dashboards/[id] etc.) -- named differently so it doesn't # collide with "/" -> index.html, which really is prerendered. try_files $uri $uri.html $uri/ /200.html; } }