Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
shuding committed Jan 25, 2022
1 parent 5369da5 commit f5b4401
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
1 change: 0 additions & 1 deletion packages/next/build/entries.ts
Expand Up @@ -181,7 +181,6 @@ export function createEntrypoints(
absolute500Path: pages['/500'] || '',
absolutePagePath,
isServerComponent: isFlight,
serverComponents: hasServerComponents,
...defaultServerlessOptions,
} as any)}!`,
isServer: false,
Expand Down
Expand Up @@ -29,7 +29,7 @@ export function getRender({
isServerComponent: boolean
config: NextConfig
}) {
// Used by `path-browserify`.
// Polyfilled for `path-browserify`.
process.cwd = () => ''
const server = new WebServer({
conf: config,
Expand All @@ -55,6 +55,7 @@ export function getRender({
})
}

// @TODO: We should move this into server/render.
if (Document.getInitialProps) {
const err = new Error(
'`getInitialProps` in Document component is not supported with `concurrentFeatures` enabled.'
Expand All @@ -71,15 +72,14 @@ export function getRender({
? JSON.parse(query.__props__)
: undefined

// Extend the options.
// Extend the context.
Object.assign((self as any).__server_context, {
renderServerComponentData,
serverComponentProps,
})

const extendedReq = new WebNextRequest(request)
const transformStream = new TransformStream()
const extendedRes = new WebNextResponse(transformStream)
const extendedRes = new WebNextResponse()
requestHandler(extendedReq, extendedRes)
return await extendedRes.toResponse()
}
Expand Down
8 changes: 0 additions & 8 deletions packages/next/server/dev/hot-reloader.ts
Expand Up @@ -534,15 +534,7 @@ export default class HotReloader {
absolute404Path: this.pagesMapping['/404'] || '',
absolutePagePath,
isServerComponent,
serverComponents: this.hasServerComponents,
buildId: this.buildId,
basePath: this.config.basePath,
assetPrefix: this.config.assetPrefix,
generateEtags: this.config.generateEtags,
poweredByHeader: this.config.poweredByHeader,
canonicalBase: this.config.amp.canonicalBase,
i18n: this.config.i18n,
previewProps: this.previewProps,
} as any)}!`,
isServer: false,
isServerWeb: true,
Expand Down

0 comments on commit f5b4401

Please sign in to comment.