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

NODE_ENV variable checked incorrectly #7043

Open
Lonli-Lokli opened this issue Nov 4, 2024 · 0 comments
Open

NODE_ENV variable checked incorrectly #7043

Lonli-Lokli opened this issue Nov 4, 2024 · 0 comments

Comments

@Lonli-Lokli
Copy link

Lonli-Lokli commented Nov 4, 2024

Environment

  • Package version(s): 5.13.0
  • Operating System: Windows
  • Browser name and version: MS Edge

Code Sandbox

[Link to a minimal repro (fork this code sandbox): ](https://stackblitz.com/edit/vitejs-vite-q2tc8k?file=src%2Fmain.tsx,src%2FApp.tsx&terminal=dev)

Steps to reproduce

Open the dev console, you will see this error message even for site built with production mode

Actual behavior

[Blueprint] Could not load "en-US" date-fns locale, please check that this locale code is supported: https://github.com/date-fns/date-fns/tree/main/src/locale

Expected behavior

No errors in console as it's built in production mode

Possible solution

Update from NODE_ENV to process.env.NODE_ENV to support non-webpack users

return typeof NODE_ENV !== "undefined" && NODE_ENV === env;

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

No branches or pull requests

1 participant