web-ext icon indicating copy to clipboard operation
web-ext copied to clipboard

Add Edge to `run`

Open avi12 opened this issue 3 years ago • 10 comments

Is this a feature request or a bug?

Feature

What is the current behavior?

run only supports Chrome and Firefox

What is the expected or desired behavior?

Add Edge to run

avi12 avatar Sep 17 '22 04:09 avi12

Is this a feature request or a bug?

Feature

What is the current behavior?

run only supports Chrome and Firefox

What is the expected or desired behavior?

Add Edge to run

Run supports all chromium based browsers by specifying such target which includes Edge, Opera... etc.

luskaner avatar Oct 04 '22 09:10 luskaner

--target supports chromium, firefox-desktop, firefox-android, but not Edge

avi12 avatar Oct 04 '22 09:10 avi12

It does by specifying the --target as chromium and specifying --chromium-binary to the path of your Edge binary. I guess you are saying the current Edge, the legacy Edge is not supported.

luskaner avatar Oct 04 '22 09:10 luskaner

Very cool, this works nicely:

 web-ext run --no-config-discovery --start-url URL --verbose --target chromium --source-dir build/chrome-mv3-dev --chromium-binary "%ProgramFiles(x86)%\Microsoft\Edge\Application\msedge.exe"

Adding such an example snippet to the documentation and/or README would be very useful

avi12 avatar Oct 04 '22 09:10 avi12

Sure, especially since there are developers who might think chromium only relates to chrome although the chromium-binary doc already says so. But anyway, since this is a open-source repo suggest you do an issue/pull-request to improve the documentation to include this use-case.

luskaner avatar Oct 04 '22 10:10 luskaner

Does it work the same way on Linux/macOS? I.e. I provide the binary location?

avi12 avatar Oct 04 '22 10:10 avi12

I'm pretty sure it does since the documentation does not mention any specific OS (but I cannot personally confirm)

luskaner avatar Oct 04 '22 10:10 luskaner

Patches are welcome. Preferably depending on either an official Microsoft-owned package to handle the path detection, or just embedding the OS-specific paths in this web-ext project itself, without any other dependencies.

Rob--W avatar Oct 27 '22 13:10 Rob--W

I've been working on OSX and specifying my own browser using --firefox=/Application/browser.app/Contents/MacOS/binary, but (obviously) that fails on Linux. On Linux, it is easier since I can just use PATH, and specify --firefox=binary, but that doesn't seem to be 'the way' for OSX. Is there a way to specify different values for --firefox per platform? Perhaps it is via the ENV? [EDIT: indeed setting WEB_EXT_FIREFOX in my shell 'rc' (different for each platform), and removing the option completely in my package.json, does the job :)]

davidmaxwaterman avatar Nov 09 '22 03:11 davidmaxwaterman