when redirect in next.config broken manifest #2025
-
DescriptionSubject: Manifest error occurs when redirecting in Currently, our product does not have a root index page, and certain pages are accessed via redirects configured in When performing a redirect, a manifest error occurs: Additionally, although this issue does not reproduce in all projects, the following error can occur:
Upon closer inspection, the error is caused by:
We are not certain whether this is a If this is not an issue with Verifications
Mandatory reproduction URLhttps://github.com/FrontLeejonghun/next-intl-test Reproduction descriptionOpen the reproduction project. Expected behaviourWhen accessing a page via redirect in next-intl, the manifest should load correctly without any redirect or 404 errors. The request to manifest.webmanifest should return the valid manifest content regardless of the redirected URL. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Your redirect pattern with You might need something more explicit like this: // next.config.ts
import createNextIntlPlugin from 'next-intl/plugin';
import {routing} from './src/i18n/routing';
const withNextIntl = createNextIntlPlugin();
/** @type {import('next').NextConfig} */
const nextConfig = {
async redirects() {
return [
...routing.locales.flatMap((locale) => [
{
source: `/${locale}`,
destination: `/${locale}/outer/inner`,
permanent: true
},
{
source: `/${locale}/outer`,
destination: `/${locale}/outer/inner`,
permanent: true
}
])
];
}
};
export default withNextIntl(nextConfig); I'll move this to a discussion since it seems to be a usage question. |
Beta Was this translation helpful? Give feedback.
Your redirect pattern with
source: '/:locale'
is likely too aggressive and catches e.g. the manifest request.You might need something more explicit like this: