Repository navigation
fix(vercel): enable ISR passQuery when allowQuery is set - #4790
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
commit: |
|
Moving to draft. An e2e test on a real Vercel deployment showed no difference from v2: with Triaged with AI assistance. |
0ba9d7e to
61ae2e5
Compare
Fixes #4408 on v2. Vercel only sends the query string to an ISR function when
passQueryis set. WithallowQueryalone, every?lang=value got its own cache entry, but each one held the page rendered withoutlang. Nitro now writespassQuery: trueto.prerender-config.jsonwhen the user'sallowQuerylists any params, unlesspassQueryis set explicitly (falseis respected).isr: true, routes withoutallowQueryand an emptyallowQueryare unchanged. The JSDoc and Vercel docs are updated, and the same change is made on main in #4792.I kept the ISR URL restoration changes backported from #4409 and #4599. On real Vercel they didn't change behavior for any request shape we saw, but they're small defensive handling and keep v2's runtime in line with main.
Checked on real Vercel against a v2 baseline.
/products/a?lang=eslostlangbefore and keeps it now.?lang=esand?lang=frare cached separately with the right content. Params not inallowQueryare dropped,__isr_routedoesn't leak, andpassQuery: falsekeeps the old behavior.🤖 Generated with AI assistant