Skip to content

Commit 8bad9b3

Browse files
me4502LekoArts
andauthored
perf(gatsby): Minify page-data (#35578)
Co-authored-by: Lennart <lekoarts@gmail.com>
1 parent 39e9840 commit 8bad9b3

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

packages/gatsby/src/utils/page-data-helpers.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,19 @@ export function constructPageDataString(
2020
}: IPageData,
2121
result: string | Buffer
2222
): string {
23-
let body = `{
24-
"componentChunkName": "${componentChunkName}",
25-
"path": ${JSON.stringify(pagePath)},
26-
"result": ${result},
27-
"staticQueryHashes": ${JSON.stringify(staticQueryHashes)}`
23+
let body =
24+
`{` +
25+
`"componentChunkName":"${componentChunkName}",` +
26+
`"path":${JSON.stringify(pagePath)},` +
27+
`"result":${result},` +
28+
`"staticQueryHashes":${JSON.stringify(staticQueryHashes)}`
2829

2930
if (matchPath) {
30-
body += `,
31-
"matchPath": "${matchPath}"`
31+
body += `,"matchPath":"${matchPath}"`
3232
}
3333

3434
if (manifestId) {
35-
body += `,
36-
"manifestId": "${manifestId}"`
35+
body += `,"manifestId":"${manifestId}"`
3736
}
3837

3938
body += `}`

0 commit comments

Comments
 (0)