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
383eec36
Commit
383eec36
authored
May 03, 2017
by
Arunoda Susiripala
Committed by
GitHub
May 03, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
We are using some divs to wrap some script tags. (#1867)
We don't need them. So, this change will remove them.
parent
5e393b14
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
document.js
server/document.js
+7
-8
No files found.
server/document.js
View file @
383eec36
...
@@ -108,6 +108,7 @@ export class NextScript extends Component {
...
@@ -108,6 +108,7 @@ export class NextScript extends Component {
return
(
return
(
<
script
<
script
key
=
{
filename
}
type
=
'text/javascript'
type
=
'text/javascript'
src
=
{
`
${
assetPrefix
}
/_next/
${
hash
}
/
${
filename
}
`
}
src
=
{
`
${
assetPrefix
}
/_next/
${
hash
}
/
${
filename
}
`
}
{...
additionalProps
}
{...
additionalProps
}
...
@@ -118,18 +119,16 @@ export class NextScript extends Component {
...
@@ -118,18 +119,16 @@ export class NextScript extends Component {
getScripts
()
{
getScripts
()
{
const
{
dev
}
=
this
.
context
.
_documentProps
const
{
dev
}
=
this
.
context
.
_documentProps
if
(
dev
)
{
if
(
dev
)
{
return
(
return
[
<
div
>
this
.
getChunkScript
(
'manifest.js'
),
{
this
.
getChunkScript
(
'manifest.js'
)
}
this
.
getChunkScript
(
'commons.js'
),
{
this
.
getChunkScript
(
'commons.js'
)
}
this
.
getChunkScript
(
'main.js'
)
{
this
.
getChunkScript
(
'main.js'
)
}
]
<
/div
>
)
}
}
// In the production mode, we have a single asset with all the JS content.
// In the production mode, we have a single asset with all the JS content.
// So, we can load the script with async
// So, we can load the script with async
return
this
.
getChunkScript
(
'app.js'
,
{
async
:
true
})
return
[
this
.
getChunkScript
(
'app.js'
,
{
async
:
true
})]
}
}
render
()
{
render
()
{
...
...
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