[NEXT-1071] Static sitemap route is not optimized as static #48991
Labels
area: app
App directory (appDir: true)
linear: next
Confirmed issue that is tracked by the Next.js team.
Metadata
Related to Next.js' Metadata API.
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true), Metadata (metadata, generateMetadata, next/head, head.js)
Link to the code that reproduces this issue
Install a standard Next.js setup v13.3.2 and use static export + new appDir and add an
app/sitemap.ts
file.next.config.js
file :To Reproduce
When running
npm run build
, sitemap isn't generated. In development mode, the sitemap is accessible.app/sitemap.ts
file :Build log :
As you can see, sitemap end up with a weird filename
/sitemap.xml/[[...__metadata_id__]]
and it didn't write to the file system. Robots is fine, but sitemap doesn't end up in the out folder in production build.Describe the Bug
A sitemap isn't generated in the out folder when runnning
npm run build
.Expected Behavior
A sitemap should be generated in the out folder when runnning
npm run build
.Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
From SyncLinear.com | NEXT-1071
The text was updated successfully, but these errors were encountered: