-
Couldn't load subscription status.
- Fork 29.7k
Open
Labels
MetadataRelated to Next.js' Metadata API.Related to Next.js' Metadata API.
Description
Link to the code that reproduces this issue
https://github.com/WarFiN123/nextjs-reproduction-app
To Reproduce
- Enable
cacheComponentsin the Next.js config file. - Add a sitemap file.
- Run
next build
Current vs. Expected behavior
Current Behaviour:
Next.js will flag /sitemap.xml as a dynamic route instead of a static one
Expected Behaviour:
Next.js should flag /sitemap.xml as a static route unless explicitly defined to be a dynamic one by the user
Provide environment information
Operating System:
Platform: win32
Arch: x64
Version: Windows 11 Home Single Language
Available memory (MB): 32540
Available CPU cores: 16
Binaries:
Node: 24.8.0
npm: 11.5.2
Yarn: N/A
pnpm: 10.19.0
Relevant Packages:
next: 16.0.1-canary.2 // Latest available version is detected (16.0.1-canary.2).
eslint-config-next: N/A
react: 19.2.0
react-dom: 19.2.0
typescript: 5.9.3
Next.js Config:
output: N/AWhich area(s) are affected? (Select all that apply)
Metadata, cacheComponents
Which stage(s) are affected? (Select all that apply)
next build (local)
Additional context
I can also open a PR for the fix
Metadata
Metadata
Assignees
Labels
MetadataRelated to Next.js' Metadata API.Related to Next.js' Metadata API.