We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e6b2fd1 commit 7cef5feCopy full SHA for 7cef5fe
packages/runtime/src/helpers/redirects.ts
@@ -143,7 +143,7 @@ const generateStaticIsrRewrites = ({
143
return
144
}
145
// The default locale is served from the root, not the localised path
146
- if (i18n?.defaultLocale && route.startsWith(`/${i18n.defaultLocale}`)) {
+ if (i18n?.defaultLocale && (route.startsWith(`/${i18n.defaultLocale}/`) || route === `/${i18n.defaultLocale}`)) {
147
route = route.slice(i18n.defaultLocale.length + 1) || '/'
148
staticRoutePaths.add(route)
149
if (matchesMiddleware(middleware, route)) {
0 commit comments