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(nuxt): support usage of std-env in runtime code #21372

Merged
merged 2 commits into from Jun 5, 2023

Conversation

danielroe
Copy link
Member

@danielroe danielroe commented Jun 5, 2023

πŸ”— Linked issue

resolves #21313

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

We should transpile std-env since if it is used in runtime code the process.env variables need to be statically replaced with unenv mock or hardcoded values.

We can also statically replace process.env.NODE_ENV within client code for this use case.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroe danielroe requested a review from pi0 June 5, 2023 10:40
@danielroe danielroe self-assigned this Jun 5, 2023
@danielroe danielroe changed the title fix(nuxt): transpile std-env fix(nuxt): support usage of std-env in runtime code Jun 5, 2023
@danielroe danielroe merged commit 05b577e into main Jun 5, 2023
22 checks passed
@danielroe danielroe deleted the fix/std-env-transpile branch June 5, 2023 18:23
This was referenced Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issues with std-env and NODE_ENV
2 participants