-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat: match next.js env file loading behavior in bin scripts & importConfig, clean up installed packages & mismatching package versions #6601
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…and within importConfig
denolfe
requested changes
Jun 3, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's either use the next-env
package or emulate all of the functionality.
https://github.com/vercel/next.js/blob/canary/packages/next-env/index.ts
AlessioGr
changed the title
fix: ensure .env.local files are automatically loaded in bin scripts and within importConfig
fix: match next.js env file loading behavior in bin scripts and within importConfig
Jun 3, 2024
denolfe
approved these changes
Jun 3, 2024
AlessioGr
changed the title
fix: match next.js env file loading behavior in bin scripts and within importConfig
feat: match next.js env file loading behavior in bin scripts and within importConfig
Jun 3, 2024
…ep's declare modules
AlessioGr
changed the title
feat: match next.js env file loading behavior in bin scripts and within importConfig
feat: match next.js env file loading behavior in bin scripts & importConfig, clean up installed packages & mismatching package versions
Jun 3, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, people would experience errors if they have a .env.local file and run migrate:create, as our loadEnv script previously only checked for .env files, not .env.local files.
Also, this adds loadEnv to importConfig by default, so that we do not have to force people to run and install dotenv for standalone scripts. Just like next automatically handles loading .env files, payload should do so to