use correct build paths

This commit is contained in:
Ishaan Jaff 2024-08-05 15:59:50 -07:00 committed by Krrish Dholakia
parent 3b8fc93091
commit beefd221d3
2 changed files with 7 additions and 7 deletions

12
ui/litellm-dashboard/build_ui_custom_path.sh Normal file → Executable file
View file

@ -1,14 +1,14 @@
#!/bin/bash #!/bin/bash
# Check if BASE_UI_PATH argument is provided # Check if UI_BASE_PATH argument is provided
if [ -z "$1" ]; then if [ -z "$1" ]; then
echo "Error: BASE_UI_PATH argument is required." echo "Error: UI_BASE_PATH argument is required."
echo "Usage: $0 <BASE_UI_PATH>" echo "Usage: $0 <UI_BASE_PATH>"
exit 1 exit 1
fi fi
# Set BASE_UI_PATH from the first argument # Set UI_BASE_PATH from the first argument
BASE_UI_PATH="$1" UI_BASE_PATH="$1"
# Check if nvm is not installed # Check if nvm is not installed
if ! command -v nvm &> /dev/null; then if ! command -v nvm &> /dev/null; then
@ -34,7 +34,7 @@ echo "Contents of ui_colors.json:"
cat ui_colors.json cat ui_colors.json
# Run npm build with the environment variable # Run npm build with the environment variable
BASE_UI_PATH=$BASE_UI_PATH npm run build UI_BASE_PATH=$UI_BASE_PATH npm run build
# Check if the build was successful # Check if the build was successful
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then

View file

@ -1,7 +1,7 @@
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const nextConfig = { const nextConfig = {
output: 'export', output: 'export',
basePath: '/ui', basePath: process.env.UI_BASE_PATH || '/ui',
}; };
nextConfig.experimental = { nextConfig.experimental = {