Skip to content

Commit 7b07098

Browse files
authored
chore(rsc): tweak types and examples (#682)
1 parent 556de15 commit 7b07098

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/plugin-rsc/examples/basic/src/routes/hmr-shared/atomic/client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ export function TestClient({
99
testSharedFromServer: string
1010
}) {
1111
React.useEffect(() => {
12-
console.log({ testShared, testSharedFromServer })
1312
if (testShared !== testSharedFromServer) {
13+
console.log({ testShared, testSharedFromServer })
1414
throw new Error(
1515
`Mismatch: ${JSON.stringify({ testShared, testSharedFromServer })}`,
1616
)

packages/plugin-rsc/src/plugin.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1521,15 +1521,15 @@ function mergeAssetDeps(a: AssetDeps, b: AssetDeps): AssetDeps {
15211521
}
15221522

15231523
function collectAssetDeps(bundle: Rollup.OutputBundle) {
1524-
const chunkToDeps = new Map<Rollup.OutputChunk, AssetDeps>()
1524+
const chunkToDeps = new Map<Rollup.OutputChunk, ResolvedAssetDeps>()
15251525
for (const chunk of Object.values(bundle)) {
15261526
if (chunk.type === 'chunk') {
15271527
chunkToDeps.set(chunk, collectAssetDepsInner(chunk.fileName, bundle))
15281528
}
15291529
}
15301530
const idToDeps: Record<
15311531
string,
1532-
{ chunk: Rollup.OutputChunk; deps: AssetDeps }
1532+
{ chunk: Rollup.OutputChunk; deps: ResolvedAssetDeps }
15331533
> = {}
15341534
for (const [chunk, deps] of chunkToDeps.entries()) {
15351535
for (const id of chunk.moduleIds) {
@@ -1542,7 +1542,7 @@ function collectAssetDeps(bundle: Rollup.OutputBundle) {
15421542
function collectAssetDepsInner(
15431543
fileName: string,
15441544
bundle: Rollup.OutputBundle,
1545-
): AssetDeps {
1545+
): ResolvedAssetDeps {
15461546
const visited = new Set<string>()
15471547
const css: string[] = []
15481548

0 commit comments

Comments
 (0)