File tree Expand file tree Collapse file tree
packages/vite-plugin-web-extension/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,9 +27,12 @@ export function createWebExtRunner(
2727
2828 const initialConfig = await loadConfig ( { pluginOptions, logger, paths } ) ;
2929 const target =
30- pluginOptions . browser === null || pluginOptions . browser === "firefox"
31- ? null
32- : "chromium" ;
30+ pluginOptions . browser === "chrome"
31+ ? "chromium"
32+ : pluginOptions . browser === null ||
33+ pluginOptions . browser === "firefox"
34+ ? "firefox-desktop"
35+ : initialConfig . target ?? "chromium" ;
3336
3437 const sourceDir = paths . outDir ;
3538 const config = {
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ export interface UserOptions {
6262 *
6363 * @default "chrome"
6464 */
65- browser ?: string ;
65+ browser ?: 'chrome' | 'firefox' | ( string & { } ) | null ;
6666
6767 /**
6868 * Do not validate your manifest to make sure it can be loaded by browsers.
@@ -119,7 +119,7 @@ export interface ResolvedOptions {
119119 additionalInputs : string [ ] ;
120120 disableAutoLaunch : boolean ;
121121 watchFilePaths : string [ ] ;
122- browser ?: string ;
122+ browser ?: 'chrome' | 'firefox' | ( string & { } ) | null ;
123123 skipManifestValidation : boolean ;
124124 printSummary : boolean ;
125125 htmlViteConfig ?: vite . InlineConfig ;
You can’t perform that action at this time.
0 commit comments