feat: add environment configuration files for frontend #536
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.
This pull request introduces a major refactor and enhancement to the frontend workspace's environment and build configuration. The changes standardize environment variable management across different environments, improve webpack configuration modularity, and make the development setup more robust and flexible. Key updates include the addition of a custom dotenv management utility, significant rewrites of webpack configs to leverage this utility, and improvements to local development and build processes. These changes are meant to be in sync with Model Registry.
Environment variable and dotenv management:
config/dotenv.js
utility to handle loading and expanding environment variables, supporting both root and nested project structures, and integrating with webpack via plugins..env*
files to include relevant variables for branding, deployment mode, and environment-specific settings, ensuring consistent configuration across development, production, and testing.Webpack configuration refactor:
webpack.common.js
andwebpack.dev.js
to use the new dotenv utility, moving away from hardcoded paths and variables. This enables dynamic configuration based on environment variables and simplifies path management.Build and asset handling improvements:
Documentation and developer experience:
README.md
to clarify that the UI runs with mocked data by default and how to control backend connectivity via the environment.Other housekeeping:
.env
from.gitignore
to allow versioning of environment templates, and made minor cleanups to support the new structure.These changes collectively make the frontend workspace more maintainable, configurable, and developer-friendly.