extension-develop
Version:
The develop step of Extension.js
42 lines (41 loc) • 1.6 kB
TypeScript
import { type Compiler } from '@rspack/core';
import { type PluginInterface } from './browsers-types';
import { DevOptions } from '../../develop-lib/config-types';
/**
* BrowsersPlugin works by finding the binary for the browser specified in the
* options and running it with the extension loaded.
*
* Supports:
* - User profile - a custom profile can be specified for the target browser
* - Preferences - a set of preferences can be specified for the target browser
* - Starting URL - a custom URL can be specified for the target browser
* - Browser flags - a set of flags can be specified for the target browser
* - Chromium binary - a custom path to the Chromium binary can be specified
* - Gecko binary - a custom path to the Gecko binary can be specified
*
* First-class browsers supported:
* - Chrome
* - Edge
* - Firefox
*/
export declare class BrowsersPlugin {
static readonly name: string;
readonly extension: string | string[];
readonly browser: DevOptions['browser'];
readonly open?: boolean;
readonly browserFlags?: string[];
readonly excludeBrowserFlags?: string[];
readonly profile?: string | false;
readonly preferences?: Record<string, any>;
readonly startingUrl?: string;
readonly chromiumBinary?: string;
readonly geckoBinary?: string;
readonly instanceId?: string;
readonly port?: number | string;
readonly source?: string;
readonly watchSource?: boolean;
readonly reuseProfile?: boolean;
readonly dryRun?: boolean;
constructor(options: PluginInterface);
apply(compiler: Compiler): void;
}