Skip to content

Commit 7bda38a

Browse files
authored
feat:(gatsby-cli) - support REACT_PROFILE env var value to set profile cli argument (#37754)
feat: looks for REACT_PROFILE env var value to set profile cli argument
1 parent 9f26b67 commit 7bda38a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/gatsby-cli/src/create-cli.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,9 @@ function buildLocalCommands(cli: yargs.Argv, isLocalSite: boolean): void {
245245
})
246246
.option(`profile`, {
247247
type: `boolean`,
248-
default: false,
248+
default:
249+
process.env.REACT_PROFILE === `true` ||
250+
process.env.REACT_PROFILE === `1`,
249251
describe: `Build site with react profiling (this can add some additional overhead). See https://reactjs.org/docs/profiler`,
250252
})
251253
.option(`graphql-tracing`, {

0 commit comments

Comments
 (0)