Skip to content

Commit 3536062

Browse files
fix(rsc): correctly select entry chunk when multiple chunks are named "index" (fix #1060) (#1061)
Co-authored-by: Hiroshi Ogawa <hi.ogawa.zz@gmail.com>
1 parent 82f45aa commit 3536062

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/plugin-rsc/src/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ export function createRpcClient(params) {
10601060

10611061
const assetDeps = collectAssetDeps(bundle)
10621062
const entry = Object.values(assetDeps).find(
1063-
(v) => v.chunk.name === 'index',
1063+
(v) => v.chunk.name === 'index' && v.chunk.isEntry,
10641064
)
10651065
assert(entry)
10661066
const entryUrl = assetsURL(entry.chunk.fileName, manager)

0 commit comments

Comments
 (0)