Thanks! Though still cannot get it to work. I r...
# cy10-feedback
i
Thanks! Though still cannot get it to work. I run my E2E's using a configfile depending on the environment (so different config for TST, ACC, etc.). So the package.json says:
Copy code
"scripts": {
        "cypress:opentst": "cypress open --env configFile=testEnvConfig",
        "cypress:openacc": "cypress open --env configFile=accEnvConfig"
}
So now I have a Typescript file called 'testEnvConfig' like this (thanks for that 🙂 ):
Copy code
export default defineConfig({
  e2e: {
    env: {
      FOO: 'BAR'
    },
  },
});
Cypress picks up the env configuration if I put it in cypress.config.ts, but for some reason it does not pick it up from my 'testEnvConfig' file if I specify the fiel in the CLI.This used to work in Cypress 9 (when my config file was still json). So I am puzzled why it no longer picks it up now. Name of the file remains the same, it is just TS instead of JSON.