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

fix: allow running --ui #787

Merged
merged 2 commits into from Feb 18, 2022
Merged

fix: allow running --ui #787

merged 2 commits into from Feb 18, 2022

Conversation

sheremet-va
Copy link
Member

Fixes #785

@netlify
Copy link

netlify bot commented Feb 18, 2022

✔️ 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

@antfu antfu enabled auto-merge (squash) February 18, 2022 05:32
@antfu antfu merged commit 924ba44 into main Feb 18, 2022
@antfu antfu deleted the sheremet-va/fix-define-with-ui branch February 18, 2022 05:33
delete define['process.env.NODE_ENV']
delete define['global.process.env.NODE_ENV']
delete define['globalThis.process.env.NODE_ENV']
}
Copy link
Member

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.

Copy link
Member Author

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

Copy link
Member

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

Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Process Env Error With --ui
3 participants