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

Vite dev server screen additional infos (mode, loaded env) #18719

Open
4 tasks done
y-nk opened this issue Nov 20, 2024 · 1 comment
Open
4 tasks done

Vite dev server screen additional infos (mode, loaded env) #18719

y-nk opened this issue Nov 20, 2024 · 1 comment

Comments

@y-nk
Copy link

y-nk commented Nov 20, 2024

Description

As a developer using the dev server (vite) I'd like to see the mode passed with the --mode option, as well as the stack of .env var loaded.

Suggested solution

For mode, i guess directly here:

  VITE v5.4.11  ready in 171 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
  ➜  Mode: development
  ➜  press h + enter to show help

For env, a new shortcut

  Shortcuts
  press e + enter to see the env files loaded
  press r + enter to restart the server
  press u + enter to show server url
  press o + enter to open in browser
  press c + enter to clear console
  press q + enter to quit

  Env files loaded:
  1. .env
  2. .env.local
  3. .env.development

Alternative

there's no real alternative, you can only console.log(import.meta.env) and compute the values mentally

Additional context

No response

Validations

@sapphi-red
Copy link
Member

I think it makes sense to show the mode. But for the loaded env files, I guess you can know which file is loaded if you know which mode it's running in.

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

No branches or pull requests

2 participants