Skip to content

Commit ed740bb

Browse files
authored
Adding gatsby-config.js to root dir
As directed by gatsby docs, if using environment variables (env) add the above code in gatsby-config file. This lets the `dotenv` - an already installed inner dependency of gatsby - to make (env) available instantly
1 parent 8dd1244 commit ed740bb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gatsby-config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
require("dotenv").config({
2+
path: `.env.${process.env.NODE_ENV}`,
3+
})

0 commit comments

Comments
 (0)