Skip to content

Commit

Permalink
Update to copy necessary RSC files from dep (#30505)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
ijjk and kodiakhq[bot] committed Oct 28, 2021
1 parent 88131eb commit 215cc58
Show file tree
Hide file tree
Showing 12 changed files with 1,643 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export default function middlewareRSCLoader(this: any) {
${
isServerComponent
? `
import { renderToReadableStream } from 'react-server-dom-webpack/writer.browser.server'
import { createFromReadableStream } from 'react-server-dom-webpack'`
import { renderToReadableStream } from 'next/dist/compiled/react-server-dom-webpack/writer.browser.server'
import { createFromReadableStream } from 'next/dist/compiled/react-server-dom-webpack'`
: ''
}
Expand Down
4 changes: 3 additions & 1 deletion packages/next/client/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,9 @@ if (process.env.__NEXT_RSC) {
serialized?: string
_fresh?: boolean
}) => {
const { createFromFetch } = require('react-server-dom-webpack')
const {
createFromFetch,
} = require('next/dist/compiled/react-server-dom-webpack')
let response = rscCache.get(cacheKey)

// If there is no cache, or there is serialized data already
Expand Down

0 comments on commit 215cc58

Please sign in to comment.