You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@vobu I have to admit I kind of struggled enhancing the in place functions of the config file. What are your thought about using explicit functions in the template to simplify things for my future self?
e.g.
//this is just a sample in case env params are disjoint, don't judge me 🐱
function getBrowserArgs () {
//this was my enhancement for the CI
if (process.argv.includes("--ci")) {
return ["--disable-gpu", "--disable-dev-shm-usage", "--headless", "--window-size=1440,800", "--disable-software-rasterizer"];
}
if (process.argv.includes("--headless")) {
return ["--headless", "--window-size=1440,800"];
}
if (process.argv.includes("--debug")) {
return ["--window-size=1440,800", "--auto-open-devtools-for-tabs"];
}
return ["--window-size=1440,800"];
}
...
"goog:chromeOptions": {
args: getBrowserArgs()
instead of
"goog:chromeOptions": {
args:
//I would have had to enhance this which is kind of unreadable in the end 🙈
process.argv.indexOf("--headless") > -1
? ["--headless=new"]
: process.argv.indexOf("--debug") > -1
? ["window-size=1440,800", "--auto-open-devtools-for-tabs"]
: ["window-size=1440,800"]
},
The text was updated successfully, but these errors were encountered:
Hey 👋🏻
@vobu I have to admit I kind of struggled enhancing the in place functions of the config file. What are your thought about using explicit functions in the template to simplify things for my future self?
e.g.
instead of
The text was updated successfully, but these errors were encountered: