Wrangler: Add option to choose browser in wrangler preview

Created on 8 May 2020  路  6Comments  路  Source: cloudflare/wrangler

馃挕 Feature request

Overview and problem statement

Some of us use a different browser for development than our default browser. It would be great if we could let wrangler preview know which browser to use, and default to the default browser.

Basic example

wrangler preview --browser 'Firefox Developer Edition' or use maybe read BROWSER from environment variables

category - feature priority - low status - PR welcome user report wontfix

All 6 comments

i believe wrangler should already respect your operating system's default browser.

windows uses start %my_url%
macos uses open $my_url
linux uses xdg-open $my_url

each of those tools should be able to be configured to open whatever browser you want

Yes indeed, what I am asking is to be able to override this.

My use-case (which i think is fairly common): I use Firefox for personal browsing and that鈥檚 my OS (macOS) default browser. For dev work I use Firefox developer edition, which allow me to (for example) clear cache anytime without loosing personal browsing history, etc.

Sounds good - I'll leave this open as a feature request 馃槃 Is there a reason you're using wrangler preview instead of wrangler dev? We've talked about eventually deprecating wrangler preview (definitely not until #1008 lands, which may be a while) but we want to make sure dev covers the same use cases.

I use a mix of dev and preview. dev mostly for integrated testing where my frontend will make requests to the dev server. preview mostly at the very start of implementing a function / route, or to debug things in isolation, as it is more interactive. preview provides a single place where I can query, see the response, see function logs, change my query and do it again. Also I like that with --watch it will perform my last query again once it loads the new code, a bit like a hot reload experience instead of having to manual make the call again.

Hope this bit of context helps :)

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This issue has been automatically closed because it has not had recent activity. You may re-open the issue if it is still relevant.

Was this page helpful?
0 / 5 - 0 ratings