Browser-sync: the bs-config.json option for browser choice not working

Created on 8 Mar 2016  路  5Comments  路  Source: BrowserSync/browser-sync

Issue details

On my dev wks I have edge, ie and chrome installed with edge as my default.
When the lite-server package [ https://www.npmjs.com/package/lite-server ], which is built on top of browsersync and is referenced for use in ng2 5 minute quick start [ https://angular.io/docs/ts/latest/quickstart.html ] , kicks off it launches using whatever my default browser setting is. I tested the https://www.browsersync.io/docs/options/ described bs-config.json setting "browser" : "internet explorer" and "browser" : "google chrome" to enable launching using either of those installed options instead of my default "microsoft edge" browser for those browsersync enabled debugging sessions and it always launches using my default edge browser.

Steps to reproduce/test case

Clone https://github.com/myusrn/vscng2qs and execute "npm run" on dev wks with default brower set to something other than brower setting(s) defined in bs-config.json.

Please specify which version of Browsersync, node and npm you're running

  • Browsersync [ 2.11.1 ]
  • Node [ 5.7.0 ]
  • Npm [ 3.6.0 ]

    Affected platforms

  • [ ] linux

  • [X] windows
  • [ ] OS X
  • [ ] freebsd
  • [ ] solaris
  • [ ] other _(please specify which)_

    Browsersync use-case

  • [X] API

  • [ ] Gulp
  • [ ] Grunt
  • [X] CLI

    If CLI, please paste the entire command below

npm run lite [ where this is configured to execute npm lite-server package that is built on top of browsersync ]

for all other use-cases, (gulp, grunt etc), please show us exactly how you're using Browsersync

{Browsersync init code here}

Most helpful comment

Hi, I recently ran into a similar problem. My default browser is Firefox but I wanted my lite-server (which is using browser-sync) to launch my project inside Edge.

I just want to share my workaround for this:

  1. create (or open) the bs-config.json file
  2. search for the line "browser": [ "xxx" ]
  3. to open your project with Edge, replace "xxx" with "microsoft-edge:"

See also http://www.intowindows.com/...

All 5 comments

I had a similar issue. After some messing around with the config I found that rather than have "google chrome", as the docs say, it should be just "chrome".

thanks for the followup on this and value to use to get chrome vs my default edge browser launched. It appears that with chrome and internet explorer instead of what the documentation specifies you use what the name of the executable is, i.e.

"browser": "chrome" // to get google chrome vs default browser launched
"browser": "iexplore" // to get internet explorer vs default browser launched
"browser": "edge???" // to get microsoft edge vs default browser launched

will someone be updating https://www.browsersync.io/docs/options/#option-browser documentation to reflect actual values that one uses or simply to confirm that the name expected is whatever the browser's executable file name is?

Hi, I recently ran into a similar problem. My default browser is Firefox but I wanted my lite-server (which is using browser-sync) to launch my project inside Edge.

I just want to share my workaround for this:

  1. create (or open) the bs-config.json file
  2. search for the line "browser": [ "xxx" ]
  3. to open your project with Edge, replace "xxx" with "microsoft-edge:"

See also http://www.intowindows.com/...

If using Gulp, you need to write "microsoft-edge:http://selected-host:3000" in the browser options. Writing "microsoft-edge:" alone is not enough.

If using Gulp, you need to write "microsoft-edge:http://selected-host:3000" in the browser options. Writing "microsoft-edge:" alone is not enough.

For people looking how to open edge, using "microsoft-edge:" will open an empty or the default startup page of edge browser, so after the ":" you have to provide the link you want it to open, for example:

"microsoft-edge:http://localhost:3000"

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sedubois picture sedubois  路  3Comments

npearson72 picture npearson72  路  3Comments

w88975 picture w88975  路  3Comments

ronilaukkarinen picture ronilaukkarinen  路  4Comments

adjavaherian picture adjavaherian  路  4Comments