Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nuxi dev -o doesn't respect preferred browser #326

Open
mrleblanc101 opened this issue Jan 14, 2024 · 1 comment
Open

nuxi dev -o doesn't respect preferred browser #326

mrleblanc101 opened this issue Jan 14, 2024 · 1 comment

Comments

@mrleblanc101
Copy link

Environment


  • Operating System: Darwin
  • Node Version: v16.19.1
  • Nuxt Version: 3.1.1
  • Nitro Version: 2.1.0
  • Package Manager: yarn@1.22.19
  • Builder: vite
  • User Config: srcDir, ssr, app, modules, content, colorMode, postcss, vite
  • Runtime Modules: @nuxtjs/tailwindcss@6.3.0, @nuxtjs/color-mode@3.2.0, @nuxt/content@2.4.2, @vueuse/nuxt@9.11.1, @nuxt/image-edge@1.0.0-27913696.5d122a3
  • Build Modules: -

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 mrleblanc101 changed the title nuxi dev -o doesn't respect prefered browser nuxi dev -o doesn't respect preferred browser Jan 14, 2024
@danielroe danielroe transferred this issue from nuxt/nuxt Jan 14, 2024
@pi0
Copy link
Member

pi0 commented Jan 15, 2024

Hi dear @mrleblanc101. I have moved your issue to unjs/listhen#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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants