File tree Expand file tree Collapse file tree 6 files changed +48
-2
lines changed
packages/plugin-rsc/examples/basic Expand file tree Collapse file tree 6 files changed +48
-2
lines changed Original file line number Diff line number Diff line change 1+ 'use client'
2+
3+ export function TestClientChunk1 ( ) {
4+ return < span > test-chunk1</ span >
5+ }
6+
7+ export function TestClientChunkConflict ( ) {
8+ return < span > test-chunk-conflict1</ span >
9+ }
Original file line number Diff line number Diff line change 1+ 'use client'
2+
3+ export function TestClientChunk2 ( ) {
4+ return < span > test-chunk2</ span >
5+ }
Original file line number Diff line number Diff line change 1+ 'use client'
2+
3+ export function TestClientChunk3 ( ) {
4+ return < span > test-chunk3</ span >
5+ }
6+
7+ export function TestClientChunkConflict ( ) {
8+ return < span > test-chunk-conflict3</ span >
9+ }
Original file line number Diff line number Diff line change 1+ import {
2+ TestClientChunk1 ,
3+ TestClientChunkConflict as TestClientChunkConflict1 ,
4+ } from './client1'
5+ import { TestClientChunk2 } from './client2'
6+ import {
7+ TestClientChunk3 ,
8+ TestClientChunkConflict as TestClientChunkConflict3 ,
9+ } from './client3'
10+
11+ export function TestClientChunkServer ( ) {
12+ return (
13+ < div data-testid = "test-client-chunk" >
14+ < TestClientChunk1 /> |
15+ < TestClientChunkConflict1 /> |
16+ < TestClientChunk2 /> |
17+ < TestClientChunk3 /> |
18+ < TestClientChunkConflict3 />
19+ </ div >
20+ )
21+ }
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ import { TestAssetsServer } from './assets/server'
4141import { TestHmrSwitchServer } from './hmr-switch/server'
4242import { TestHmrSwitchClient } from './hmr-switch/client'
4343import { TestTreeShakeServer } from './tree-shake/server'
44+ import { TestClientChunkServer } from './chunk/server'
4445
4546export function Root ( props : { url : URL } ) {
4647 return (
@@ -95,6 +96,7 @@ export function Root(props: { url: URL }) {
9596 < TestImportMetaGlob />
9697 < TestAssetsServer />
9798 < TestTreeShakeServer />
99+ < TestClientChunkServer />
98100 </ body >
99101 </ html >
100102 )
Original file line number Diff line number Diff line change @@ -31,8 +31,8 @@ export default defineConfig({
3131 copyServerAssetsToClient : ( fileName ) =>
3232 fileName !== '__server_secret.txt' ,
3333 clientChunks ( id ) {
34- if ( id . includes ( '/src/routes/deps /' ) ) {
35- return 'group '
34+ if ( id . includes ( '/src/routes/chunk /' ) ) {
35+ return 'custom-chunk '
3636 }
3737 } ,
3838 } ) ,
You can’t perform that action at this time.
0 commit comments