-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Labels
feat: browserIssues and PRs related to the browser runnerIssues and PRs related to the browser runnerp3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)
Description
Describe the bug
The default value for process.argv does not match between above mentioned versions, when run with the browsers mode.
- With
1.6.0it's was undefined - With
2.0.xit is an array with few values
If we use vite-plugin-node-polyfills to pollyfil the process it had different weird behavior.
- With
1.6.0it's was[] - With
2.0.xit is undefined
The vite-plugin-node-polyfills version is same in both cases, so the shims does not change at all.
Reproduction
https://stackblitz.com/edit/vitest-2-env-argv
https://stackblitz.com/edit/vitest-1-env-argv
System Info
System:
OS: macOS 14.5
CPU: (11) arm64 Apple M3 Pro
Memory: 200.19 MB / 18.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.4.0 - ~/.asdf/installs/nodejs/22.4.0/bin/node
Yarn: 1.22.22 - ~/.asdf/installs/nodejs/22.4.0/bin/yarn
npm: 10.8.1 - ~/.asdf/plugins/nodejs/shims/npm
Browsers:
Brave Browser: 126.1.67.134
Safari: 17.5Used Package Manager
yarn
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.
- 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feat: browserIssues and PRs related to the browser runnerIssues and PRs related to the browser runnerp3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)
Type
Projects
Status
Has plan