-
Notifications
You must be signed in to change notification settings - Fork 27.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix client reference manifest for interception routes (#52961)
We have the logic to group the client compiler's entry names to make sure we generate one single manifest file for the page. This is complicated and requires a special step to "group" the entry names because a page can depend on a bunch of files from everywhere. And currently, the normalization of "entryName → groupName" doesn't cover interception routes' conventions (`(.)`, `(..)` and `(...)`). This PR fixes that. Closes #52862, closes #52681, closes #52958.
- Loading branch information
Showing
4 changed files
with
50 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
test/e2e/app-dir/parallel-routes-and-interception/app/@slot/(.)nested/client.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
'use client' | ||
|
||
import { useState } from 'react' | ||
|
||
export function Client() { | ||
const value = useState('client component')[0] | ||
return <p id="interception-slot-client">{value}</p> | ||
} |
8 changes: 7 additions & 1 deletion
8
test/e2e/app-dir/parallel-routes-and-interception/app/@slot/(.)nested/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
import React from 'react' | ||
import { Client } from './client' | ||
|
||
export default function Page() { | ||
return <p id="interception-slot">interception from @slot/nested</p> | ||
return ( | ||
<> | ||
<p id="interception-slot">interception from @slot/nested</p> | ||
<Client /> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters