cli
cli copied to clipboard
`nuxi dev -o` doesn't respect preferred browser
Environment
- Operating System:
Darwin - Node Version:
v16.19.1 - Nuxt Version:
3.1.1 - Nitro Version:
2.1.0 - Package Manager:
[email protected] - Builder:
vite - User Config:
srcDir,ssr,app,modules,content,colorMode,postcss,vite - Runtime Modules:
@nuxtjs/[email protected],@nuxtjs/[email protected],@nuxt/[email protected],@vueuse/[email protected],@nuxt/[email protected] - Build Modules:
-
Reproduction
- Create a .env file with this key
BROWSER=google chromeor 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
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