Skip to content

Commit

Permalink
RSC: Remove forbidden non-null assertion (redwoodjs#10733)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobbe authored Jun 5, 2024
1 parent 88b4429 commit 8cec472
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/vite/src/lib/getMergedConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,17 +178,17 @@ function getRollupInput(ssr: boolean): InputOption | undefined {
// default
if (streamingEnabled) {
if (ssr) {
if (!rwPaths.web.entryServer) {
throw new Error('entryServer not defined')
}

if (rscEnabled) {
return {
Document: rwPaths.web.document,
'entry.server': rwPaths.web.entryServer!,
'entry.server': rwPaths.web.entryServer,
}
}

if (!rwPaths.web.entryServer) {
throw new Error('entryServer not defined')
}

return {
// NOTE: We're building the server entry *without* the react-server
// condition when we include it here. This works when only SSR is
Expand Down

0 comments on commit 8cec472

Please sign in to comment.