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
fix: allow running --ui #787
Conversation
✔️ Deploy Preview for vitest-dev ready! 🔨 Explore the source changes: 15831a7 🔍 Inspect the deploy log: https://app.netlify.com/sites/vitest-dev/deploys/620f2e6f0b7fc70008617986 😎 Browse the preview: https://deploy-preview-787--vitest-dev.netlify.app |
delete define['process.env.NODE_ENV'] | ||
delete define['global.process.env.NODE_ENV'] | ||
delete define['globalThis.process.env.NODE_ENV'] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-blocking comment: Are we deleting these entries in case the user added them by hand, no? Should we instead filter them out where they are causing issues? (with a patch in Vite if necessary). Or maybe I'm missing some context, and the comment could be expanded a bit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they will be deleted if user added them by hand, yes
to be honest, this is not needed, until Vite fixes replacing NODE_ENV
, then we would need to remove them to allow reassigning on our side. Or don't add them in Vite for SSR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I kinda agree not to delete them. If user define them and get the error, it's more like their responsiblity to either fix it or find a workaround
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I kinda agree not to delete them. If user define them and get the error, it's more like their responsiblity to either fix it or find a workaround
Then we shouldn't add them in Vite
Fixes #785