next-runtime icon indicating copy to clipboard operation
next-runtime copied to clipboard

Middleware on sites with i18n cannot rewrite to static files

Open serhalp opened this issue 1 year ago • 0 comments

Rewrites in middleware on i18n sites add the locale to the target automatically. However it is supposed to skip this if the target is a static file. This does not currently work, as the middleware doesn't know if a static file exists. This is documented as a known issue.

Data

The following is parsed automatically by the Next.js repo e2e test report generator.

test: test/e2e/i18n-ignore-rewrite-source-locale/rewrites-with-basepath.test.ts, test/e2e/i18n-ignore-rewrite-source-locale/rewrites.test.ts reason: Middleware on sites with i18n cannot rewrite to static files

serhalp avatar Jun 13 '24 21:06 serhalp