Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n config in pages router does not set cache headers for HTML pages #676

Open
ilkergzlkkr opened this issue Dec 15, 2024 · 0 comments
Open

Comments

@ilkergzlkkr
Copy link

Next.js version : 15.0.1
OpenNext v3.2.2

configuring i18n in pages router adds locale prefix to routes which fails workaround fixCacheHeaderForHtmlPages in

if (HtmlPages.includes(rawPath)) {

const nextConfig: NextConfig = {
  i18n: {
    locales: ["en"],
    defaultLocale: "en",
  },
};

with new .next/server/pages-manifest.json

{
  "/_app": "pages/_app.js",
  "/api/trpc/[trpc]": "pages/api/trpc/[trpc].js",
  "/_error": "pages/_error.js",
  "/_document": "pages/_document.js",
  "/en/404": "pages/en/404.html",
  "/en/500": "pages/en/500.html",
  "/en": "pages/en.html"
}

Build Output is the same

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant