-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Closed
Labels
p4-importantViolate documented behavior or significantly improves performance (priority)Violate documented behavior or significantly improves performance (priority)regressionThe issue only appears after a new releaseThe issue only appears after a new release
Description
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
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
p4-importantViolate documented behavior or significantly improves performance (priority)Violate documented behavior or significantly improves performance (priority)regressionThe issue only appears after a new releaseThe issue only appears after a new release