You've already forked domainstack.io
mirror of
https://github.com/jakejarvis/domainstack.io.git
synced 2025-12-02 19:33:48 -05:00
18 lines
465 B
TypeScript
18 lines
465 B
TypeScript
import "server-only";
|
|
|
|
export async function launchChromium(
|
|
overrides: Record<string, unknown> = {},
|
|
): Promise<import("puppeteer-core").Browser> {
|
|
const chromium = (await import("@sparticuz/chromium")).default;
|
|
const { launch } = await import("puppeteer-core");
|
|
|
|
const executablePath = await chromium.executablePath();
|
|
return launch({
|
|
headless: true,
|
|
args: chromium.args,
|
|
executablePath,
|
|
defaultViewport: null,
|
|
...overrides,
|
|
});
|
|
}
|