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
c2153115
Commit
c2153115
authored
Jan 20, 2017
by
alex newman
Committed by
Arunoda Susiripala
Jan 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move nextdata into nextScript and make Main return a single el (#831)
parent
5be9c040
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
document.js
server/document.js
+5
-7
No files found.
server/document.js
View file @
c2153115
...
...
@@ -69,13 +69,8 @@ export class Main extends Component {
}
render
()
{
const
{
html
,
__NEXT_DATA__
,
staticMarkup
}
=
this
.
context
.
_documentProps
return
<
div
>
<
div
id
=
'__next'
dangerouslySetInnerHTML
=
{{
__html
:
html
}}
/
>
{
staticMarkup
?
null
:
<
script
dangerouslySetInnerHTML
=
{{
__html
:
`__NEXT_DATA__ =
${
htmlescape
(
__NEXT_DATA__
)}
; module={};`
}}
/>
}
<
/div
>
const
{
html
}
=
this
.
context
.
_documentProps
return
<
div
id
=
'__next'
dangerouslySetInnerHTML
=
{{
__html
:
html
}}
/
>
}
}
...
...
@@ -89,6 +84,9 @@ export class NextScript extends Component {
let
{
buildId
}
=
__NEXT_DATA__
return
<
div
>
{
staticMarkup
?
null
:
<
script
dangerouslySetInnerHTML
=
{{
__html
:
`__NEXT_DATA__ =
${
htmlescape
(
__NEXT_DATA__
)}
; module={};`
}}
/>
}
{
staticMarkup
?
null
:
<
script
type
=
'text/javascript'
src
=
{
`/_next/
${
buildId
}
/commons.js`
}
/>
}
{
staticMarkup
?
null
:
<
script
type
=
'text/javascript'
src
=
{
`/_next/
${
buildId
}
/main.js`
}
/>
}
<
/div
>
...
...
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