Skip to content

Commit afe8e4e

Browse files
docs: add Vite bundling documentation
- Update CHANGELOG.md with frontend bundling option - Update frontend-options.md with Vite vs CDN comparison
1 parent ca32845 commit afe8e4e

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1919
#### API & Frontend Options
2020
- API frameworks: Django REST Framework, Strawberry GraphQL, both, or none
2121
- Frontend: HTMX + Tailwind CSS, Next.js, or headless
22+
- Frontend bundling for HTMX+Tailwind: Vite (production-ready) or CDN (simple)
2223
- Authentication: django-allauth, JWT, or both
2324

2425
#### Background Task Processing

docs/features/frontend-options.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,39 @@ Modern, minimal-JavaScript approach with server-rendered HTML.
1616
- **Tailwind CSS** for styling
1717
- **Alpine.js** for lightweight JavaScript
1818

19+
#### Asset Bundling Options
20+
21+
When you select HTMX + Tailwind, you can choose how assets are delivered:
22+
23+
| Option | Best For | Build Step | External Dependencies |
24+
|--------|----------|------------|----------------------|
25+
| **Vite** (default) | Production apps | Yes | None |
26+
| **CDN** | Prototypes, MVPs | No | Yes (3 CDNs) |
27+
28+
**Vite (Recommended for Production)**
29+
30+
- Bundles Tailwind CSS, HTMX, and Alpine.js locally
31+
- No external CDN dependencies in production
32+
- Proper CSS purging for smaller bundles
33+
- Hot Module Replacement (HMR) in development
34+
- Uses `django-vite` for seamless Django integration
35+
36+
Development:
37+
```bash
38+
docker-compose up # Starts Django + Vite dev server
39+
```
40+
41+
Production:
42+
- Assets are built during Docker image build
43+
- Served via WhiteNoise from `/static/dist/`
44+
45+
**CDN (Simple, No Build Step)**
46+
47+
- Assets loaded from external CDNs (tailwindcss, unpkg, jsdelivr)
48+
- Zero configuration needed
49+
- Good for quick prototypes
50+
- Not recommended for production (external dependencies)
51+
1952
### Next.js
2053

2154
Full-featured React framework for building modern web applications.

0 commit comments

Comments
 (0)