Closed lokimckay closed 2 years ago
Chrome supports the --window-size
argument when launching from the CLI.
web-ext
, the tool used to open the browser and install the extension, supports configuring the CLI arguments passed to the browser start command via the --args
flag.
To configure this within the plugin:
webExtension({
manifest: ...,
webExtConfig: {
args: ["--window-size=400x300"],
},
})
This is untested, web-ext's JS docs aren't great, so I'm assuming
--args
on the CLI maps to a string array calledargs
in the JS config
I see that the webExtConfig
option is not documented in the README, I'll add a section for it.
Thanks very much, the below snippet worked in my case (needed to change x
to ,
)
webExtension({
manifest: ...,
webExtConfig: {
args: ["--window-size=400,300"],
},
})
I'd like to control the size of the Chrome window that automatically launches when running
vite build --watch
I only need a small window to test my extension, but it currently launches as a large window - meaning I have to resize it every time I run the command
Is there already a workaround for this?