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

Cannot override process.env.NODE_ENV #781

Closed
6 tasks done
fadi-george opened this issue Feb 17, 2022 · 1 comment
Closed
6 tasks done

Cannot override process.env.NODE_ENV #781

fadi-george opened this issue Feb 17, 2022 · 1 comment
Labels

Comments

@fadi-george
Copy link

Describe the bug

Some scripts/code have conditionals that check against process.env.NODE_ENV. It should overridable for some test.

Reproduction

https://stackblitz.com/edit/node-t29ck6?file=src%2Fsomething.spec.ts

System Info

System:
    OS: macOS 12.1
    CPU: (8) arm64 Apple M1 Pro
    Memory: 212.92 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.13.2 - ~/.nvm/versions/node/v16.13.2/bin/node
    npm: 8.1.2 - ~/.nvm/versions/node/v16.13.2/bin/npm
  Browsers:
    Brave Browser: 98.1.35.103
    Chrome: 98.0.4758.102
    Firefox: 96.0.3
    Safari: 15.2
  npmPackages:
    vitest: ^0.3.6 => 0.3.6

Used Package Manager

npm

Validations

@sheremet-va
Copy link
Member

This is a known limitation vitejs/vite#6935 (review)

@github-actions github-actions bot locked and limited conversation to collaborators Jun 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants