Skip to content

Commit b5b41a0

Browse files
authored
fix(gatsby-plugin-benchmark-reporting): Update pageCount to use NUM_PAGES (#22766)
* Update pageCount to use NUM_PAGES * parseInt for NUM_PAGES environment
1 parent c6552a2 commit b5b41a0

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

packages/gatsby-plugin-benchmark-reporting/src/gatsby-node.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,6 @@ class BenchMeta {
157157
`find public .cache -type f -iname "*.bmp" -or -iname "*.tif" -or -iname "*.webp" -or -iname "*.svg" | wc -l`
158158
)
159159

160-
const pageCount = glob(`**/**.json`, {
161-
cwd: `./public/page-data`,
162-
nocase: true,
163-
}).length
164-
165160
const benchmarkMetadata = this.getMetadata()
166161

167162
return {
@@ -181,7 +176,7 @@ class BenchMeta {
181176
webpack: webpackVersion,
182177
},
183178
counts: {
184-
pages: pageCount,
179+
pages: parseInt(process.env.NUM_PAGES),
185180
jpgs: jpgCount,
186181
pngs: pngCount,
187182
gifs: gifCount,

0 commit comments

Comments
 (0)