Commit 383eec36 authored by Arunoda Susiripala's avatar Arunoda Susiripala Committed by GitHub

We are using some divs to wrap some script tags. (#1867)

We don't need them.
So, this change will remove them.
parent 5e393b14
......@@ -108,6 +108,7 @@ export class NextScript extends Component {
return (
<script
key={filename}
type='text/javascript'
src={`${assetPrefix}/_next/${hash}/${filename}`}
{...additionalProps}
......@@ -118,18 +119,16 @@ export class NextScript extends Component {
getScripts () {
const { dev } = this.context._documentProps
if (dev) {
return (
<div>
{ this.getChunkScript('manifest.js') }
{ this.getChunkScript('commons.js') }
{ this.getChunkScript('main.js') }
</div>
)
return [
this.getChunkScript('manifest.js'),
this.getChunkScript('commons.js'),
this.getChunkScript('main.js')
]
}
// In the production mode, we have a single asset with all the JS content.
// So, we can load the script with async
return this.getChunkScript('app.js', { async: true })
return [this.getChunkScript('app.js', { async: true })]
}
render () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment