Skip to content
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

Fix RSC prefetch for index route with catch-all #10734

Merged
merged 4 commits into from
Oct 20, 2023
Merged

Conversation

ijjk
Copy link
Member

@ijjk ijjk commented Oct 19, 2023

When matching outputs and we have an index.{ext} file it will take priority over dynamic routes which we don't want to match prefetch RSC index outputs unless it's specifically a prefetch request so this remaps this specific file to avoid the overlap.

x-ref: slack thread

@changeset-bot
Copy link

changeset-bot bot commented Oct 19, 2023

🦋 Changeset detected

Latest commit: 1f23c84

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

This PR includes changesets to release 2 packages
Name Type
@vercel/next Patch
vercel 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

@ijjk ijjk added the pr: automerge Automatically merge the PR when checks pass label Oct 19, 2023
Copy link
Member Author

@ijjk ijjk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like test failure is from CI still using Node.js v16 instead of v18 and Next.js canary bumped min required version

@kodiakhq kodiakhq bot merged commit de84743 into main Oct 20, 2023
112 of 117 checks passed
@kodiakhq kodiakhq bot deleted the fix/index-rsc-prefetch branch October 20, 2023 15:05
kodiakhq bot pushed a commit that referenced this pull request Oct 20, 2023
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.


# Releases
## vercel@32.5.0

### Minor Changes

-   Indicates whether @vercel/speed-insights or @vercel/analytics are used ([#10623](#10623))

-   [cli] update env var validation rule to allow name start with underscore ([#10697](#10697))

### Patch Changes

-   Updated dependencies \[[`da300030c`](da30003), [`de84743e1`](de84743), [`913608de4`](913608d), [`7fa08088e`](7fa0808)]:
    -   @vercel/next@4.0.11
    -   @vercel/python@4.1.0
    -   @vercel/remix-builder@2.0.10
    -   @vercel/redwood@2.0.5
    -   @vercel/static-build@2.0.9

## @vercel/python@4.1.0

### Minor Changes

-   Add support for pip3.10 and pip3.11 ([#10648](#10648))

## @vercel/routing-utils@3.1.0

### Minor Changes

-   Adds support for statusCode property on rewrites ([#10495](#10495))

## @vercel/client@13.0.6

### Patch Changes

-   Updated dependencies \[[`9e9fac019`](9e9fac0)]:
    -   @vercel/routing-utils@3.1.0

## @vercel/fs-detectors@5.1.2

### Patch Changes

-   Updated dependencies \[[`9e9fac019`](9e9fac0)]:
    -   @vercel/routing-utils@3.1.0

## @vercel/gatsby-plugin-vercel-builder@2.0.8

### Patch Changes

-   Updated dependencies \[[`9e9fac019`](9e9fac0)]:
    -   @vercel/routing-utils@3.1.0

## @vercel/next@4.0.11

### Patch Changes

-   fix `build` in appDir on Windows ([#10708](#10708))

-   Fix RSC prefetch for index route with catch-all ([#10734](#10734))

## @vercel/redwood@2.0.5

### Patch Changes

-   Updated dependencies \[[`9e9fac019`](9e9fac0)]:
    -   @vercel/routing-utils@3.1.0

## @vercel/remix-builder@2.0.10

### Patch Changes

-   Update `@remix-run/dev` fork to v2.1.0 ([#10732](#10732))

## @vercel/static-build@2.0.9

### Patch Changes

-   Updated dependencies \[]:
    -   @vercel/gatsby-plugin-vercel-builder@2.0.8

## @vercel-internals/types@1.0.13

### Patch Changes

-   Updated dependencies \[[`9e9fac019`](9e9fac0)]:
    -   @vercel/routing-utils@3.1.0
kodiakhq bot pushed a commit that referenced this pull request Oct 24, 2023
Follow-up to #10734 -- but considers that the static prefetch associated with `/` might be inside of a dir such as `index/index.prefetch.rsc`. 

To avoid any future matching conflicts, this PR updates to prefix all static prefetches
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: automerge Automatically merge the PR when checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants