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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(basic): prefer non global process object #214

Merged
merged 1 commit into from Jul 12, 2023

Conversation

zanminkian
Copy link
Contributor

@zanminkian zanminkian commented Jul 6, 2023

Description

I've re-thought it carefully.

Any way, we should not use process.env in frontend projects. So enable this rule will benefit node projects.

BTW, why did not vite document mention the process.env but import.meta.env? Maybe vite author do not recommend us to use process.env in frontend project. 馃槅

Linked Issues

Additional context

#159

@antfu antfu merged commit 3ef955d into antfu:main Jul 12, 2023
@cuebit
Copy link

cuebit commented Jul 17, 2023

This does not take into consideration applications that use string replacement for environment definitions. For example, all Nuxt applications will require this to be disabled or set to "always".

@Hebilicious
Copy link

cc @antfu can confirm that this breaks the types of all my nuxt projects and modules 馃槄

@cuebit
Copy link

cuebit commented Aug 13, 2023

FYI this won鈥檛 be an issue in the much anticipated release of Nuxt 3.7 nuxt/nuxt#22428

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.

None yet

4 participants