fix(portal-shell): catch-all route prevents NG04002 on /fr in dev mode #96

Merged
julien merged 1 commits from fix/portal-shell/router-wildcard-fallback into main 2026-05-11 22:12:25 +02:00
+12
View File
@@ -31,4 +31,16 @@ export const appRoutes: Route[] = [
redirectTo: 'accessibility', redirectTo: 'accessibility',
pathMatch: 'full', pathMatch: 'full',
}, },
// Catch-all. In production each locale ships with its own
// `<base href="/{locale}/">`, so the router never actually sees
// the locale segment — `/fr/foo` is normalised to `foo` before
// route matching, and unknown paths land here for a graceful
// bounce to home. In dev (`nx serve`) the dev server serves the
// source bundle for any URL, including `/fr/...`; without this
// fallback the router throws NG04002 trying to match `fr` as a
// segment.
{
path: '**',
redirectTo: '',
},
]; ];