Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
2cc2cb4f
Unverified
Commit
2cc2cb4f
authored
Aug 26, 2021
by
Gerald Monaco
Committed by
GitHub
Aug 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support for functional Document components (#28515)
parent
d8093ec4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
206 additions
and
243 deletions
+206
-243
page-handler.ts
...ld/webpack/loaders/next-serverless-loader/page-handler.ts
+1
-0
render.tsx
packages/next/server/render.tsx
+192
-243
_document.js
test/integration/react-18/app/pages/_document.js
+13
-0
No files found.
packages/next/build/webpack/loaders/next-serverless-loader/page-handler.ts
View file @
2cc2cb4f
...
@@ -116,6 +116,7 @@ export function getPageHandler(ctx: ServerlessHandlerCtx) {
...
@@ -116,6 +116,7 @@ export function getPageHandler(ctx: ServerlessHandlerCtx) {
previewProps
:
encodedPreviewProps
,
previewProps
:
encodedPreviewProps
,
env
:
process
.
env
,
env
:
process
.
env
,
basePath
,
basePath
,
requireStaticHTML
:
true
,
// Serverless target doesn't support streaming
...
_renderOpts
,
...
_renderOpts
,
}
}
let
_nextData
=
false
let
_nextData
=
false
...
...
packages/next/server/render.tsx
View file @
2cc2cb4f
This diff is collapsed.
Click to expand it.
test/integration/react-18/app/pages/_document.js
0 → 100644
View file @
2cc2cb4f
import
{
Html
,
Head
,
Main
,
NextScript
}
from
'next/document'
export
default
function
Document
()
{
return
(
<
Html
>
<
Head
/>
<
body
>
<
Main
/>
<
NextScript
/>
<
/body
>
<
/Html
>
)
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment