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
832425e6
Commit
832425e6
authored
Feb 21, 2018
by
Olivier Tassinari
Committed by
Arunoda Susiripala
Feb 21, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix w3c warnings (#3572)
parent
27f70839
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
5 deletions
+2
-5
page-loader.js
lib/page-loader.js
+0
-1
document.js
server/document.js
+2
-4
No files found.
lib/page-loader.js
View file @
832425e6
...
@@ -74,7 +74,6 @@ export default class PageLoader {
...
@@ -74,7 +74,6 @@ export default class PageLoader {
const
script
=
document
.
createElement
(
'script'
)
const
script
=
document
.
createElement
(
'script'
)
const
url
=
`
${
this
.
assetPrefix
}
/_next/
${
encodeURIComponent
(
this
.
buildId
)}
/page
${
scriptRoute
}
`
const
url
=
`
${
this
.
assetPrefix
}
/_next/
${
encodeURIComponent
(
this
.
buildId
)}
/page
${
scriptRoute
}
`
script
.
src
=
url
script
.
src
=
url
script
.
type
=
'text/javascript'
script
.
onerror
=
()
=>
{
script
.
onerror
=
()
=>
{
const
error
=
new
Error
(
`Error when loading route:
${
route
}
`
)
const
error
=
new
Error
(
`Error when loading route:
${
route
}
`
)
this
.
pageRegisterEvents
.
emit
(
route
,
{
error
})
this
.
pageRegisterEvents
.
emit
(
route
,
{
error
})
...
...
server/document.js
View file @
832425e6
...
@@ -132,7 +132,6 @@ export class NextScript extends Component {
...
@@ -132,7 +132,6 @@ export class NextScript extends Component {
return
(
return
(
<
script
<
script
key
=
{
filename
}
key
=
{
filename
}
type
=
'text/javascript'
src
=
{
`
${
assetPrefix
}
/_next/
${
hash
}
/
${
filename
}
`
}
src
=
{
`
${
assetPrefix
}
/_next/
${
hash
}
/
${
filename
}
`
}
{...
additionalProps
}
{...
additionalProps
}
/
>
/
>
...
@@ -163,7 +162,6 @@ export class NextScript extends Component {
...
@@ -163,7 +162,6 @@ export class NextScript extends Component {
<
script
<
script
async
async
key
=
{
chunk
}
key
=
{
chunk
}
type
=
'text/javascript'
src
=
{
`
${
assetPrefix
}
/_next/webpack/chunks/
${
chunk
}
`
}
src
=
{
`
${
assetPrefix
}
/_next/webpack/chunks/
${
chunk
}
`
}
/
>
/
>
))}
))}
...
@@ -204,8 +202,8 @@ export class NextScript extends Component {
...
@@ -204,8 +202,8 @@ export class NextScript extends Component {
`
}
`
}
`
`
}}
/>
}
}}
/>
}
{
page
!==
'/_error'
&&
<
script
async
id
=
{
`__NEXT_PAGE__
${
pathname
}
`
}
type
=
'text/javascript'
src
=
{
`
${
assetPrefix
}
/_next/
${
buildId
}
/page
${
pagePathname
}
`
}
/>
}
{
page
!==
'/_error'
&&
<
script
async
id
=
{
`__NEXT_PAGE__
${
pathname
}
`
}
src
=
{
`
${
assetPrefix
}
/_next/
${
buildId
}
/page
${
pagePathname
}
`
}
/>
}
<
script
async
id
=
{
`__NEXT_PAGE__/_error`
}
type
=
'text/javascript'
src
=
{
`
${
assetPrefix
}
/_next/
${
buildId
}
/page/_error.js`
}
/
>
<
script
async
id
=
{
`__NEXT_PAGE__/_error`
}
src
=
{
`
${
assetPrefix
}
/_next/
${
buildId
}
/page/_error.js`
}
/
>
{
staticMarkup
?
null
:
this
.
getDynamicChunks
()}
{
staticMarkup
?
null
:
this
.
getDynamicChunks
()}
{
staticMarkup
?
null
:
this
.
getScripts
()}
{
staticMarkup
?
null
:
this
.
getScripts
()}
<
/Fragment
>
<
/Fragment
>
...
...
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