This commit is contained in:
@@ -25,12 +25,14 @@ const PDF_CONFIG = {
|
||||
|
||||
// Browser launch options for different environments
|
||||
const getLaunchOptions = (): LaunchOptions => {
|
||||
const chromePath = process.env.PUPPETEER_EXECUTABLE_PATH;
|
||||
const browserPath = process.env.PUPPETEER_EXECUTABLE_PATH;
|
||||
const browser = process.env.PUPPETEER_BROWSER || 'chrome';
|
||||
const options: LaunchOptions = {
|
||||
headless: true,
|
||||
browser: browser as 'chrome' | 'firefox',
|
||||
};
|
||||
if (chromePath) {
|
||||
options.executablePath = chromePath;
|
||||
if (browserPath) {
|
||||
options.executablePath = browserPath;
|
||||
}
|
||||
return options;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user