Skip to content

Commit 383eec3

Browse files
authored
We are using some divs to wrap some script tags. (vercel#1867)
We don't need them. So, this change will remove them.
1 parent 5e393b1 commit 383eec3

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

server/document.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ export class NextScript extends Component {
108108

109109
return (
110110
<script
111+
key={filename}
111112
type='text/javascript'
112113
src={`${assetPrefix}/_next/${hash}/${filename}`}
113114
{...additionalProps}
@@ -118,18 +119,16 @@ export class NextScript extends Component {
118119
getScripts () {
119120
const { dev } = this.context._documentProps
120121
if (dev) {
121-
return (
122-
<div>
123-
{ this.getChunkScript('manifest.js') }
124-
{ this.getChunkScript('commons.js') }
125-
{ this.getChunkScript('main.js') }
126-
</div>
127-
)
122+
return [
123+
this.getChunkScript('manifest.js'),
124+
this.getChunkScript('commons.js'),
125+
this.getChunkScript('main.js')
126+
]
128127
}
129128

130129
// In the production mode, we have a single asset with all the JS content.
131130
// So, we can load the script with async
132-
return this.getChunkScript('app.js', { async: true })
131+
return [this.getChunkScript('app.js', { async: true })]
133132
}
134133

135134
render () {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy