After beta.19's URL-space cleanup, /{baseLocale}/ no longer
pre-renders. But the bundled Header still emitted locale links as
/{locale} unconditionally, so clicking "EN" on a multi-locale site
where en is base landed on /en/ → 404 (the catch-all renders the
NotFound component since beta.20).
Two fixes:
- Header.vue builds locale links via localeHref(): base → /, others
→ /{locale}. Reads baseLocale from the loadConfig singleton.
- applyRouterGuards adds a beforeEach that catches in-SPA navigation
to /{baseLocale}/... and rewrites to the canonical unprefixed
equivalent. Components or stale internal links can no longer route
themselves to a 404.
Direct external hits to /{baseLocale}/... still serve the SSG 404 —
those need an Amplify customRule on the site side. Documented in
CLAUDE.md "URL hygiene".
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>