Hi guys ....can anyone please help me here? I am t...
# help
m
Hi guys ....can anyone please help me here? I am trying to upgrade Cypress to 10.3.0 from 9.6.1 for my project. I had following kind of code in my plugins/index.js using which I was setting my environment specific json config files. This code I want to transform into Cypress.config.js. How can I do it please?
Copy code
const envValue = config.env() || 'local'
    const pathToConfigFile = path.resolve('cypress/config', `${envValue}.json`)

    const envConfig = JSON.parse(fs.readFileSync(pathToConfigFile));
    console.log(`envConfig ${JSON.stringify(envConfig)}`)
    return Object.assign({}, config, {

        env: Object.assign({}, envConfig, {
            X_Api_Key: process.env.X_Api_Key}),

        viewportWidth: 1366,
        viewportHeight: 768,
})

}