Skip to content

Commit 7aca76b

Browse files
tlgimenesclaude
andauthored
fix(docs): remove conflicting redirects and i18n config causing build failure (#2465)
In Astro 5 static build mode, config-level redirects with dynamic patterns (e.g. /en/[...slug]) create redirect routes that Astro tries to statically generate, but the redirect route handler has no getStaticPaths(), causing a [GetStaticPathsRequired] build error. The [locale]/[...slug].astro page already handles these redirects programmatically via Astro.redirect(), so the config-level redirects were redundant and conflicting. The i18n routing config was also creating injected fallback routes that clashed with the manual locale routing in the page files. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c06e7f5 commit 7aca76b

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

apps/docs/astro.config.mjs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,9 @@ export default defineConfig({
4343
},
4444
redirects: {
4545
"/": "/latest/en/introduction",
46-
"/en/[...slug]": "/latest/en/[...slug]",
47-
"/pt-br/[...slug]": "/latest/pt-br/[...slug]",
4846
},
4947
outDir: "dist/client/",
5048
srcDir: "client/src",
51-
i18n: {
52-
locales: ["en", "pt-br"],
53-
defaultLocale: "en",
54-
routing: {
55-
prefixDefaultLocale: true,
56-
},
57-
},
5849
integrations: [mdx(), react(), patchCsrRedirect()],
5950
vite: {
6051
plugins: [

0 commit comments

Comments
 (0)