- 
                Notifications
    
You must be signed in to change notification settings  - Fork 50
 
refactor(web): improve environment file loading logic in webpack config #1187
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
Conversation
This commit refines the environment file loading logic in the webpack configuration. It updates variable names for clarity, ensures that the correct environment file is used, and enhances logging for build processes. Additionally, it maintains flexibility by allowing environment variables to be provided via process.env when the specified file is not found.
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.
Pull Request Overview
This PR refactors the webpack configuration to improve environment file loading and remove fallback behavior. The changes clarify variable naming and modify how environment variables are loaded.
- Renamed 
filetoenvFilefor better clarity - Removed the default fallback to 
.env.localwhenenvNameis not in the map - Added 
override: trueoption todotenv.config()to ensure environment file values override existing process.env variables - Removed the default 
"local"fallback for theENVIRONMENTvariable 
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
Follow-up to #1185
This commit refines the environment file loading logic in the webpack configuration. It updates variable names for clarity, ensures that the correct environment file is used, and enhances logging for build processes. Additionally, it maintains flexibility by allowing environment variables to be provided via process.env when the specified file is not found.