cli icon indicating copy to clipboard operation
cli copied to clipboard

`nuxi dev -o` doesn't respect preferred browser

Open mrleblanc101 opened this issue 2 years ago • 1 comments

Environment



Reproduction

  • Create a .env file with this key BROWSER=google chrome or any browser that is not your default browser
  • Run nuxi dev -o, the default browser will open instead of the specified browser in the env file

Describe the bug

From the vite documentation using the open npm package, it should open the browser specified in process.env.browser, I suppose Nuxt use it's own implementation instead of the one in Vite ?

Additional context

No response

Logs

No response

mrleblanc101 avatar Jan 14 '24 03:01 mrleblanc101

Hi dear @mrleblanc101. I have moved your issue to https://github.com/unjs/listhen/issues/154 where the open logic is implemented to see if we are missing any impl details.

The logic is optimized for bundling and inlined here if you like to help in investigation: https://github.com/unjs/listhen/blob/main/src/lib/open.ts

pi0 avatar Jan 15 '24 10:01 pi0