cold-apartment-77594
09/20/2022, 7:52 AMplugins/index.js
file. The old file looks as follows.
const fs = require('fs-extra')
const path = require('path')
module.exports = (on, config) => {
const file = config.env.configFile || 'development'
const pathToConfigFile = path.resolve('config', `${file}.json`)
return fs.readJson(pathToConfigFile)
}
Where the config files look as follows.
{
"baseUrl": "https://local.example.com",
"cypressEnv": "local",
"gtmId": "ID-666",
"video": false
}
I had a look at the migration guide and it seems that I have to move this logic into the setupNodeEvents()
function. However, I have no idea how to set for example baseUrl
and cypressEnv
inside setupNodeEvents()
. Any help would be appreciated.