Is there a guide on how to configure building assets using different .env files?

For my Sage 10 project, I want to use the same .env variable like PUBLIC_BASE_URL but hold different values from .env.staging and .env.production. Then configure my build commands for their respective environments before deploying. The documentation is quite limited on this from bud.config or bud.env and how to approach this.

If there are other suggestions, that would be much appreciated.

In bud.config.js you can write whatever JS logic you like and use dotenv values: bud.env | bud.js

How do you deploy your code, not with Trellis?

1 Like