Skip to content

Commit

Permalink
feat:(gatsby-cli) - support REACT_PROFILE env var value to set profil…
Browse files Browse the repository at this point in the history
…e cli argument (#37754)

feat: looks for REACT_PROFILE env var value to set profile cli argument
  • Loading branch information
aghreed committed Mar 20, 2023
1 parent 9f26b67 commit 7bda38a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/gatsby-cli/src/create-cli.ts
Expand Up @@ -245,7 +245,9 @@ function buildLocalCommands(cli: yargs.Argv, isLocalSite: boolean): void {
})
.option(`profile`, {
type: `boolean`,
default: false,
default:
process.env.REACT_PROFILE === `true` ||
process.env.REACT_PROFILE === `1`,
describe: `Build site with react profiling (this can add some additional overhead). See https://reactjs.org/docs/profiler`,
})
.option(`graphql-tracing`, {
Expand Down

0 comments on commit 7bda38a

Please sign in to comment.