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 3.2 ignores env variables from cli #10676

Closed
7 tasks done
rrittwag opened this issue Oct 28, 2022 · 0 comments · Fixed by #10684
Closed
7 tasks done

vite 3.2 ignores env variables from cli #10676

rrittwag opened this issue Oct 28, 2022 · 0 comments · Fixed by #10684
Labels
p4-important Violate documented behavior or significantly improves performance (priority) regression The issue only appears after a new release

Comments

@rrittwag
Copy link

rrittwag commented Oct 28, 2022

Describe the bug

Env variables that are defined in a cli call (e.g. VITE_TITLE='title from cli' vite) are ignored since Vite 3.2.0.

Reproduction

https://stackblitz.com/edit/vitejs-vite-rr4qtt?file=package.json

Steps to reproduce

  • use an env variable in vite (e.g. VITE_TITLE)
  • define or override it via cli call (e.g. in package.json)

Expected behaviour: the env variable is defined/overriden by cli - as it is common in most cli tools.

Current behaviour: Since Vite v3.2.0 the cli env variables are ignored.

System Info

System:
    OS: macOS 13.0
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 599.27 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.11.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 8.19.2 - /usr/local/bin/npm
  Browsers:
    Chrome: 106.0.5249.119
    Firefox: 106.0.2
    Safari: 16.1
  npmPackages:
    vite: 3.2.0 => 3.2.0

Used Package Manager

npm

Logs

No response

Validations

@sapphi-red sapphi-red added p4-important Violate documented behavior or significantly improves performance (priority) regression The issue only appears after a new release labels Oct 28, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Nov 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p4-important Violate documented behavior or significantly improves performance (priority) regression The issue only appears after a new release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants