Skip to content

Commit c8bd9d4

Browse files
committed
feat(platform-web): expose ignoreDefaultArgs in browser config
Forward Playwright's launch option through WebBrowserConfigSchema so users can disable or override Playwright's default Chromium/Firefox/WebKit launch arguments (e.g. removing --enable-automation, or providing a custom arg set) without having to fork the runner. Accepts either a boolean or a string[] of default args to ignore, matching Playwright's LaunchOptions.ignoreDefaultArgs signature.
1 parent 5747dda commit c8bd9d4

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

packages/platform-web/src/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export const WebBrowserConfigSchema = z.object({
88
headless: z.boolean().default(true),
99
channel: z.string().optional(),
1010
executablePath: z.string().optional(),
11+
ignoreDefaultArgs: z.union([z.boolean(), z.array(z.string())]).optional(),
1112
});
1213

1314
export const WebPlatformConfigSchema = z.object({

packages/platform-web/src/runner.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ const getWebRunner = async (
8686
headless: parsedConfig.browser.headless,
8787
channel: parsedConfig.browser.channel,
8888
executablePath: parsedConfig.browser.executablePath,
89+
ignoreDefaultArgs: parsedConfig.browser.ignoreDefaultArgs,
8990
});
9091

9192
const context = await browser.newContext();

0 commit comments

Comments
 (0)