Skip to content

Commit 6379534

Browse files
authored
fix(gatsby): Filtering page queries (#33515)
1 parent d5634a4 commit 6379534

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/gatsby/src/commands/build.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ import {
5555
import { shouldGenerateEngines } from "../utils/engines-helpers"
5656
import reporter from "gatsby-cli/lib/reporter"
5757
import type webpack from "webpack"
58-
import { materializePageMode } from "../utils/page-mode"
58+
import { materializePageMode, getPageMode } from "../utils/page-mode"
5959
import { validateEngines } from "../utils/validate-engines"
6060

6161
module.exports = async function build(program: IBuildArgs): Promise<void> {
@@ -243,7 +243,7 @@ module.exports = async function build(program: IBuildArgs): Promise<void> {
243243
// Only run queries with mode SSG
244244
if (_CFLAGS_.GATSBY_MAJOR === `4`) {
245245
queryIds.pageQueryIds = queryIds.pageQueryIds.filter(
246-
query => query.mode === `SSG`
246+
query => getPageMode(query) === `SSG`
247247
)
248248
}
249249

0 commit comments

Comments
 (0)