DEV Community

Discussion on: Stop Shipping Broken Env Config

Collapse
 
philmillman profile image
Phil Miller • Edited

There are a few different ways to handle env specific stuff. You can have separate schema files per env if you like (which get auto-loaded based on currentEnv) or you can set whether a particular item is required for a specific env at the item level. That would look something like:

# @sensitive @required=forEnv(production) 
STRIPE_WEBHOOK_SECRET=
Enter fullscreen mode Exit fullscreen mode

More on that here: varlock.dev/guides/environments/.