fix(start-plugin-core): keep prerender trailing slash off the query string#7838
fix(start-plugin-core): keep prerender trailing slash off the query string#7838cjsewell wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe prerender crawler now applies trailing slashes to URL paths without modifying query strings. A patch changeset documents the fix for ChangesPrerender query-safe URL normalization
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
We only review implementation PRs after the underlying issue has been reproduced, triaged, and the scope has been agreed with a maintainer. Please include a minimal reproduction in the PR and wait for maintainer confirmation before submitting a fix. I’m closing this PR for now; we can revisit it once the issue is confirmed |
fix(start-plugin-core): keep prerender trailing slash off the query string
Summary
The prerender crawler applied
withTrailingSlashto the full request path including the query string. Withoutufo'srespectQueryAndFragmentoption,withTrailingSlashappends the slash to the end of the string, so it lands inside the last search-param value rather than on the path:With
crawlLinksenabled, this corrupts any crawled link that carries a search param and turns it into an infinite loop. Each round appends one more slash to the value. Because every URL is unique the crawler'sseenset never dedups, so the queue grows without bound and the build hangs.Change
packages/start-plugin-core/src/prerender.ts:Test plan
<a href="/route?param=value">./route?param=value%2F%2F…and never finishes./route/?param=valuewith the query preserved. The crawl then converges and dedups.Closes #7837
Summary by CodeRabbit
Bug Fixes
Release