# Feature Request ## TODO * [x] Create `.env.development` and `.env.production` files with appropriate environment variables. * [x] Update Vite config and code to dynamically load the base URL depending on the environment. * [x] Test that API requests use the correct base URL in both development and production modes. * [x] Extract hardcoded values such as colors, background colors, and tension from Chart.js settings into a separate config file. * [x] Structure chart configuration and styling for better reusability and maintainability. ## Describe Solution * Use Vite’s `loadEnv` to load environment variables based on the current mode. * Manage API base URL through environment variables to avoid hardcoding. * Extract visual settings from Chart.js (colors, backgrounds, line tension, etc.) into constants stored in a config file. * Use the separated config consistently across components and modules to ensure maintainability. ## Additional Info * Reference: [https://vitejs.dev/guide/env-and-mode.html](https://vitejs.dev/guide/env-and-mode.html) * Related commit examples: * `chore: Setup .env files for dev and prod environments` * `chore: Extract Chart.js config and styling into constants for better maintainability`
Feature Request
TODO
.env.developmentand.env.productionfiles with appropriate environment variables.Describe Solution
loadEnvto load environment variables based on the current mode.Additional Info
Reference: https://vitejs.dev/guide/env-and-mode.html
Related commit examples:
chore: Setup .env files for dev and prod environmentschore: Extract Chart.js config and styling into constants for better maintainability