conditionally render siteUrl property in Gatsby-config based on environment - Stack Overflow

PHOTO EMBED

Fri Apr 16 2021 18:37:14 GMT+0000 (UTC)

Saved by @richard

// gatsby-config.js
require("dotenv").config({
    path: `.env.${process.env.NODE_ENV}`,
})
content_copyCOPY

https://stackoverflow.com/questions/62733663/conditionally-render-siteurl-property-in-gatsby-config-based-on-environment