File tree 2 files changed +8
-5
lines changed
packages/vite-plugin-web-extension/src
2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -27,9 +27,12 @@ export function createWebExtRunner(
27
27
28
28
const initialConfig = await loadConfig ( { pluginOptions, logger, paths } ) ;
29
29
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" ;
33
36
34
37
const sourceDir = paths . outDir ;
35
38
const config = {
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ export interface UserOptions {
62
62
*
63
63
* @default "chrome"
64
64
*/
65
- browser ?: string ;
65
+ browser ?: 'chrome' | 'firefox' | ( string & { } ) | null ;
66
66
67
67
/**
68
68
* Do not validate your manifest to make sure it can be loaded by browsers.
@@ -119,7 +119,7 @@ export interface ResolvedOptions {
119
119
additionalInputs : string [ ] ;
120
120
disableAutoLaunch : boolean ;
121
121
watchFilePaths : string [ ] ;
122
- browser ?: string ;
122
+ browser ?: 'chrome' | 'firefox' | ( string & { } ) | null ;
123
123
skipManifestValidation : boolean ;
124
124
printSummary : boolean ;
125
125
htmlViteConfig ?: vite . InlineConfig ;
You can’t perform that action at this time.
0 commit comments