Static export with skipTrailingSlashRedirect results in invalid request paths for RSC payload .txt files #74445
Labels
create-next-app
Related to our CLI tool for quickly starting a new Next.js application.
Linking and Navigating
Related to Next.js linking (e.g., <Link>) and navigation.
Output
Related to the the output configuration option.
Pages Router
Related to Pages Router.
Runtime
Related to Node.js or Edge Runtime with Next.js.
Link to the code that reproduces this issue
https://github.com/klittlepage/next-skip-trailing-slash-rsc-bug
To Reproduce
next build
out
directoryCurrent vs. Expected behavior
The routes generated by createFetch should take
skipTrailingSlashRedirect
into account, e.g.,http://localhost:8000/fails/index.txt?_rsc=1ld0r
.Provide environment information
Which area(s) are affected? (Select all that apply)
create-next-app, Navigation, Output (export/standalone), Pages Router, Runtime
Which stage(s) are affected? (Select all that apply)
next build (local), Other (Deployed)
Additional context
Related: #73427
The fix proposed by @yukiyokotani in #73912, in conjunction with the patch below, resolves the issue. NB: the patch is against: https://github.com/yukiyokotani/next.js/tree/fix-static-export-rsc-payload-path.
The text was updated successfully, but these errors were encountered: