Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
93af1eb0
Commit
93af1eb0
authored
Apr 14, 2026
by
Tim Neutkens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue
parent
56e94bd2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
index.ts
packages/next/src/build/index.ts
+2
-4
index.test.ts
test/integration/i18n-support/test/index.test.ts
+15
-0
No files found.
packages/next/src/build/index.ts
View file @
93af1eb0
...
@@ -2988,12 +2988,10 @@ export default async function build(
...
@@ -2988,12 +2988,10 @@ export default async function build(
}
}
}
}
if
(
isSsg
)
{
// remove non-locale prefixed variant from defaultMap
// remove non-locale prefixed variant from defaultMap
delete
defaultMap
[
page
]
delete
defaultMap
[
page
]
}
}
}
}
}
return
defaultMap
return
defaultMap
},
},
...
...
test/integration/i18n-support/test/index.test.ts
View file @
93af1eb0
...
@@ -97,6 +97,21 @@ describe('i18n Support', () => {
...
@@ -97,6 +97,21 @@ describe('i18n Support', () => {
expect
(
manifest
[
`/
${
locale
}
/500`
]).
toBe
(
`pages/
${
locale
}
/500.html`
)
expect
(
manifest
[
`/
${
locale
}
/500`
]).
toBe
(
`pages/
${
locale
}
/500.html`
)
}
}
})
})
it
(
'should not have non-locale-prefixed HTML files for auto-static pages'
,
async
()
=>
{
const
pagesDir
=
join
(
appDir
,
'.next/server/pages'
)
// auto-export is a non-SSG auto-static page; only locale-prefixed
// variants should exist in server/pages/ (e.g. en-US/auto-export.html).
// A bare auto-export.html would be an orphan that can interfere with routing.
expect
(
await
fs
.
pathExists
(
join
(
pagesDir
,
'auto-export.html'
))).
toBe
(
false
)
for
(
const
locale
of
locales
)
{
expect
(
await
fs
.
pathExists
(
join
(
pagesDir
,
locale
,
'auto-export.html'
))
).
toBe
(
true
)
}
})
}
}
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment