-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Labels
WebpackRelated to Webpack with Next.js.Related to Webpack with Next.js.
Description
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/practical-raman-plx3jf
To Reproduce
- Start the app (next dev)
- Go to /pathname/sitemap/0.xml
- See that we don't have the tag alternate for media
Current vs. Expected behavior
Expected xml
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://example.com/pathname/1</loc>
<xhtml:link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.example.com/pathname/1" />
</url>
</urlset>
Actual xml
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://example.com/pathname/1</loc>
</url>
</urlset>
Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #1 SMP PREEMPT_DYNAMIC Sun Aug 6 20:05:33 UTC 2023
Available memory (MB): 4102
Available CPU cores: 2
Binaries:
Node: 20.9.0
npm: 9.8.1
Yarn: 1.22.19
pnpm: 8.10.2
Relevant Packages:
next: 16.0.0-canary.15 // Latest available version is detected (16.0.0-canary.15).
eslint-config-next: N/A
react: 19.2.0
react-dom: 19.2.0
typescript: 5.3.3
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Webpack
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local), next start (local), Other (Deployed), Vercel (Deployed)
Additional context
No response
EmmaQuillivic, RSelwa, mario-zancanaro and samuelndjouli997
Metadata
Metadata
Assignees
Labels
WebpackRelated to Webpack with Next.js.Related to Webpack with Next.js.