let puppeteerConfig = { headless: "new" } if (getConfig("VITE_CHROME_EXECUTABLE_PATH")) { puppeteerConfig['defaultViewport'] = null; puppeteerConfig['executablePath'] = getConfig("VITE_CHROME_EXECUTABLE_PATH"); } else { // https://github.com/ryannono/Puppeteer-Railway-Buildpack#puppeteer-nixpacks-buildpack puppeteerConfig['args'] = ['--no-sandbox', '--disable-setuid-sandbox'] puppeteerConfig['ignoreDefaultArgs'] = ['--disable-extensions'] } const browser = await puppeteer.launch(puppeteerConfig)