next.js
6d9caf3e - fix: incorrect canonicalUrl set when using output: export (#85019)

Commit
166 days ago
fix: incorrect canonicalUrl set when using output: export (#85019) After the changes in https://github.com/vercel/next.js/commit/5ccc9078e094215e6c891c38a31fb94cda03456e, when in `output: 'export'` mode, the `canonicalUrl` value was getting corrupted to be set to one of the URLs of the RSC responses (eg `/another.txt`). This is because the original `url` gets mutated to append a `.txt` extension for the RSC requests. This ensures we preserve the original canonical URL so it doesn't get corrupted when we mutate the pathname. Failing test ref: https://github.com/vercel/next.js/actions/runs/18607156298/job/53060147186#step:34:151
Author
Parents
Loading