[COMPASS-5190] Refactor process.env handling in mongodb-compass to all happen in one place Created: 19/Oct/21  Updated: 04/Jul/23  Resolved: 04/Jul/23

Status: Closed
Project: Compass
Component/s: Refactoring, Tech debt
Affects Version/s: None
Fix Version/s: No version

Type: Task Priority: Major - P3
Reporter: Sergey Petushkov Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Documentation Changes: Not Needed
Sprint: Up for triaging

 Description   

As discussed in this GitHub thread:

  • We want process.env handling to happen in one place instead of directly referencing process.env in the application (as referencing them directly is a common pattern in the web applications due to code optimizations this provides we want to clarify in the code that we intentionally decided to not do this so that later down the road we know why and we don't try to refactor it again)
  • process.env.NODE_ENV === 'development' checks should be an exception so that we don't bundle dev only code (like react and other devtools) with the application

Generated at Wed Feb 07 22:38:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.