Closed vintprox closed 4 years ago
Actualy, when I give it a second thought, there is a way for me to do it: https://docs.cypress.io/api/plugins/configuration-api.html#Usage
You can also pass in a 3rd argument in to the plugin and it will load ALL env vars in to Cypress, not just the ones prefixed with CYPRESS_
The third is an optional [all] boolean parameter, which is set to false by default. If set to true, it returns all available environmental variables, not limited to those prefixed with CYPRESS_.
So it would look something like this:
config = dotenvPlugin(config, {}, true)
If you are still having issues with this, please feel free to comment back on this feature request and I'll open it back up
What really gets me is that I have to duplicate
BASE_URL
(that is supposed for running Nuxt.js server) in.env
intoCYPRESS_BASE_URL
variable (that overridesbaseUrl
for Cypress).Would be neat if
cypress-dotenv
provided a way to solve such problem via mapping existing variable to another.