Commit ef5495f
refactor(plugin-rsc): move
Consolidate client reference notification by moving it into the resource
proxy getter, which is called on every export access (not memoized by React).
This eliminates the separate `onLoad` callback mechanism.
- Remove `onLoad` option from `setRequireModule`
- Add `id` parameter to `wrapResourceProxy` and make `deps` required
- Notify `onClientReference` early in `load` (production) alongside preload
- Notify `onClientReference` in proxy getter for per-request asset collection
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>onClientReference notification into wrapResourceProxy
1 parent 8dc7e5f commit ef5495f
2 files changed
Lines changed: 14 additions & 35 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | 9 | | |
15 | 10 | | |
16 | 11 | | |
17 | 12 | | |
18 | 13 | | |
19 | 14 | | |
20 | 15 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 16 | + | |
28 | 17 | | |
29 | 18 | | |
30 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
61 | 62 | | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
| 63 | + | |
74 | 64 | | |
75 | 65 | | |
76 | 66 | | |
77 | 67 | | |
78 | 68 | | |
79 | | - | |
80 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
81 | 72 | | |
82 | 73 | | |
83 | 74 | | |
84 | | - | |
85 | | - | |
86 | | - | |
| 75 | + | |
| 76 | + | |
87 | 77 | | |
88 | 78 | | |
89 | 79 | | |
| |||
0 commit comments