clqms-fe1/build.sh
mahdahar 2e2e65a9f4 feat: Add environment-specific config management
- Remove static/config.json from git tracking
- Add .env.example and config.json.example as templates
- Update config store to fallback to VITE_API_URL env variable
- Add build.sh script for dev/prod builds
2026-02-19 16:34:29 +07:00

25 lines
509 B
Bash

#!/bin/bash
# Build script for different environments
# Usage: ./build.sh [dev|prod]
ENV=${1:-dev}
case $ENV in
dev)
echo "Building for development..."
cp static/config.json.dev static/config.json 2>/dev/null || echo "Using env variable VITE_API_URL"
vite build
;;
prod)
echo "Building for production..."
# Production uses env variable, no config.json needed
rm -f static/config.json
vite build
;;
*)
echo "Usage: ./build.sh [dev|prod]"
exit 1
;;
esac