Skip to content

Commit 4568556

Browse files
authored
fix(rsc): add getEntrySource assertion error message (#633)
1 parent 707f35b commit 4568556

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
@@ -869,12 +869,12 @@ function getEntrySource(
869869
name: string = 'index',
870870
) {
871871
const input = config.build.rollupOptions.input
872-
assert(input)
873872
assert(
874873
typeof input === 'object' &&
875874
!Array.isArray(input) &&
876875
name in input &&
877876
typeof input[name] === 'string',
877+
`[vite-rsc:getEntrySource] expected 'build.rollupOptions.input' to be an object with a '${name}' property that is a string, but got ${JSON.stringify(input)}`,
878878
)
879879
return input[name]
880880
}

0 commit comments

Comments
 (0)