forked from vitejs/vite
-
-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
bug: upstreamBug in a dependency of ViteBug in a dependency of Vitefeat: native pluginsrelated to exprimental.enableNativePluginsrelated to exprimental.enableNativePlugins
Description
Describe the bug
When update to 7.1.2
(also 7.1.3
and 7.1.4
),
use this code will cause build env variable is undefined.
for example:
it will be compiled to
(void 0)()
Reproduction
checkout env-issue and switch to env-issue
branch.
Steps to reproduce
- Input a env usage,and make it
toUpperCase
,likeimport.meta.env.VITE_DEMO_ENV.toUpperCase()
- build.
System Info
System:
OS: macOS 15.6.1
CPU: (10) arm64 Apple M1 Pro
Memory: 643.95 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.4.1 - ~/.n/bin/node
Yarn: 1.22.22 - ~/.n/bin/yarn
npm: 11.5.1 - ~/.n/bin/npm
pnpm: 9.15.9 - ~/.n/bin/pnpm
Browsers:
Chrome: 139.0.7258.128
Edge: 139.0.3405.102
Safari: 18.6
npmPackages:
@vitejs/plugin-vue: ^5.2.3 => 5.2.3
rolldown-vite: 7.1.4
Used Package Manager
pnpm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs and the Rolldown-related guide.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- 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
bug: upstreamBug in a dependency of ViteBug in a dependency of Vitefeat: native pluginsrelated to exprimental.enableNativePluginsrelated to exprimental.enableNativePlugins