Skip to content

v2: handle root path with basename when using Single Fetch #10636

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from

Conversation

ThisIsAreku
Copy link

@ThisIsAreku ThisIsAreku commented May 26, 2025

Using v3_singleFetchwith a basename set (i.e. /foo/), a data loader should request /foo/_root.data instead of /foo.data, as the later is outside the basename.

This PR port the patch of remix-run/react-router#12295 (comment) into the remix v2 branch

Closes: #10212

Copy link

changeset-bot bot commented May 26, 2025

🦋 Changeset detected

Latest commit: dc8a1ee

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 19 packages
Name Type
@remix-run/react Patch
@remix-run/server-runtime Patch
@remix-run/dev Patch
@remix-run/testing Patch
@remix-run/cloudflare Patch
@remix-run/deno Patch
@remix-run/node Patch
@remix-run/cloudflare-pages Patch
@remix-run/cloudflare-workers Patch
@remix-run/fs-routes Patch
@remix-run/route-config Patch
@remix-run/routes-option-adapter Patch
@remix-run/architect Patch
@remix-run/express Patch
@remix-run/serve Patch
create-remix Patch
remix Patch
@remix-run/css-bundle Patch
@remix-run/eslint-config Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@remix-cla-bot
Copy link
Contributor

remix-cla-bot bot commented May 26, 2025

Hi @ThisIsAreku,

Welcome, and thank you for contributing to Remix!

Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once.

You may review the CLA and sign it by adding your name to contributors.yml.

Once the CLA is signed, the CLA Signed label will be added to the pull request.

If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at [email protected].

Thanks!

- The Remix team

@remix-cla-bot
Copy link
Contributor

remix-cla-bot bot commented May 26, 2025

Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳

@ThisIsAreku ThisIsAreku force-pushed the singlefetch_basename branch from 94c02cc to 0041f15 Compare May 26, 2025 15:34
@ThisIsAreku ThisIsAreku force-pushed the singlefetch_basename branch from 0041f15 to dc8a1ee Compare May 27, 2025 21:04
@MichaelDeBoey MichaelDeBoey changed the title fix(singlefetch): handle root path with basename fix: handle root path with basename May 27, 2025
@MichaelDeBoey MichaelDeBoey requested a review from brophdawg11 May 27, 2025 21:56
@brophdawg11 brophdawg11 changed the title fix: handle root path with basename v2: handle root path with basename when using Single Fetch May 29, 2025
@brophdawg11 brophdawg11 added the v2 Issues related to v2 apis label May 29, 2025
@brophdawg11 brophdawg11 changed the base branch from dev to v2 May 29, 2025 20:39
@brophdawg11
Copy link
Contributor

Can this be updated to instead port over the final solution in v7 from remix-run/react-router#12898? That way we're not accessing global window values from deep inside other code and instead minimize/localize our access to window globals

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants