Exclude Frontend Build Artifacts from Git Repository#2208
Merged
danielaskdd merged 9 commits intoHKUDS:mainfrom Oct 13, 2025
Merged
Exclude Frontend Build Artifacts from Git Repository#2208danielaskdd merged 9 commits intoHKUDS:mainfrom
danielaskdd merged 9 commits intoHKUDS:mainfrom
Conversation
• Automate frontend build in CI/CD • Add build validation checks • Clean git repo of build artifacts • Comprehensive build guide docs • Smart setup.py build validation
• Remove complex setup.py build checks • Add runtime frontend validation • Update install docs with uv/bun steps • Simplify setup.py to minimal form • Check webui before server starts
• Uses exact versions from `bun.lock` without updating • Skips devDependencies, saving time and bandwidth • The --emptyOutDir already configured in vite.config.ts
• Add typography plugin dependency • Fix plugin imports in config • Add source paths to CSS
• webui will be created automatically on build
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Exclude Frontend Build Artifacts from Git Repository
Summary
This PR implements a solution to keep frontend build artifacts out of the git repository while ensuring they are included in PyPI packages. This addresses the issue of repository bloat from build artifacts while maintaining a seamless installation experience for end users.
Issue: Contributors are required to manually build the frontend after cloning the project.
Problem Statement
Previously, all frontend build results (~110 files including fonts, JavaScript bundles, CSS, and assets) were committed to the git repository. This caused:
Solution Overview
The solution implements a multi-layered approach:
.gitkeepplaceholder trackedChanges Made
1. GitHub Actions Workflow (
.github/workflows/pypi-publish.yml)Added frontend build steps to
release-buildjob:pypi-publishjob remains unchanged to preserve the existing trusted publisher configuration2. Git Configuration (
.gitignore)Updated ignore patterns:
3. Check if frontend is built before starting server
Check if frontend artifacts exists before FASTAPI Startup:
lightrat/api/webui/index.htmlexists4. Documentation (
docs/FrontendBuildGuide.md)New comprehensive guide covering:
4. Fix Build Failure Caused by Tailwind Config
Add @tailwindcss/typography plugin and fix Tailwind config
Installation Workflows
End Users (PyPI)
✅ Frontend already included, works immediately
Developers (Recommended)
✅ Flexible workflow, changes take effect immediately
Package Testing
✅ Simulates real PyPI installation experience
GitHub Release
Fully automated: Build frontend → Create package → Publish to PyPI
Impact
Repository
.gitkeep)Developer Experience
Must manually build frontend after cloning the project
End Users
Related Issues
Closes #2204
Screenshots/Logs
lightrag-sever Error Message for Missing Frontend
Additional Notes