mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
fix w3c warnings (#3572)
This commit is contained in:
parent
27f70839eb
commit
832425e67e
|
@ -74,7 +74,6 @@ export default class PageLoader {
|
|||
const script = document.createElement('script')
|
||||
const url = `${this.assetPrefix}/_next/${encodeURIComponent(this.buildId)}/page${scriptRoute}`
|
||||
script.src = url
|
||||
script.type = 'text/javascript'
|
||||
script.onerror = () => {
|
||||
const error = new Error(`Error when loading route: ${route}`)
|
||||
this.pageRegisterEvents.emit(route, { error })
|
||||
|
|
|
@ -132,7 +132,6 @@ export class NextScript extends Component {
|
|||
return (
|
||||
<script
|
||||
key={filename}
|
||||
type='text/javascript'
|
||||
src={`${assetPrefix}/_next/${hash}/${filename}`}
|
||||
{...additionalProps}
|
||||
/>
|
||||
|
@ -163,7 +162,6 @@ export class NextScript extends Component {
|
|||
<script
|
||||
async
|
||||
key={chunk}
|
||||
type='text/javascript'
|
||||
src={`${assetPrefix}/_next/webpack/chunks/${chunk}`}
|
||||
/>
|
||||
))}
|
||||
|
@ -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}`} />}
|
||||
<script async id={`__NEXT_PAGE__/_error`} type='text/javascript' src={`${assetPrefix}/_next/${buildId}/page/_error.js`} />
|
||||
{page !== '/_error' && <script async id={`__NEXT_PAGE__${pathname}`} src={`${assetPrefix}/_next/${buildId}/page${pagePathname}`} />}
|
||||
<script async id={`__NEXT_PAGE__/_error`} src={`${assetPrefix}/_next/${buildId}/page/_error.js`} />
|
||||
{staticMarkup ? null : this.getDynamicChunks()}
|
||||
{staticMarkup ? null : this.getScripts()}
|
||||
</Fragment>
|
||||
|
|
Loading…
Reference in a new issue