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(nuxi): hard-reload nuxt when .env changes #20501

Merged
merged 5 commits into from May 11, 2023
Merged

fix(nuxi): hard-reload nuxt when .env changes #20501

merged 5 commits into from May 11, 2023

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

resolves #15040

❓ 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

Currently .env variables are not reloaded when they change. This works around that and uses the existing hard-reload functionality to force a fresh cache.

πŸ“ Checklist

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

@codesandbox
Copy link

codesandbox bot commented Apr 25, 2023

CodeSandbox logoCodeSandbox logoΒ  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@danielroe danielroe added this to the v3.5 milestone May 2, 2023
@Hebilicious
Copy link
Member

Hebilicious commented May 11, 2023

Suggestion @danielroe :
Should this supports .env.* instead ? People using something like nuxt dev --dotenv .env.local would need this as well.

@danielroe
Copy link
Member Author

Maybe we could respect whatever is passed to --dotenv

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall change looks good to me πŸ‘πŸΌ Supporting custom --dotenv would be also nice :)

@danielroe danielroe merged commit 83c7172 into main May 11, 2023
18 checks passed
@danielroe danielroe deleted the fix/env-reload branch May 11, 2023 21:00
This was referenced May 11, 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.

.env values not updating properly
3 participants