Skip to content

Commit

Permalink
Set default NODE_ENV for gatsby develop (#3928)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-allanson authored and KyleAMathews committed Feb 8, 2018
1 parent 8735828 commit 5f6b7d2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/gatsby-cli/src/create-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ function buildLocalCommands(cli, isLocalSite) {
type: `boolean`,
describe: `Open the site in your browser for you.`,
}),
handler: getCommandHandler(`develop`),
handler: handlerP(
getCommandHandler(`develop`, (args, cmd) => {
process.env.NODE_ENV = process.env.NODE_ENV || `development`
return cmd(args)
})
),
})

cli.command({
Expand Down

0 comments on commit 5f6b7d2

Please sign in to comment.