Deployment Guide
Hybrid Build & Deployment Rituals.
PRID: 1201
VERIFIED
1 min read
Hybrid Build & Deployment Guide
This project utilizes a Hybrid Build Strategy to ensure compatibility between rapid prototyping environments (like Google AI Studio) and strict production environments (like Cloudflare Pages).
1. The Challenge
- AI Studio (Development): Prefers
CDNlinks andimportmapin HTML for instant previews without a build step. - Cloudflare Pages (Production): Requires a strict
Vitebuild process to bundle assets, shake trees, and optimize performance. Direct CDN usage in production causes "should not be used in production" warnings and performance issues.
2. The Solution: "Build-Time Cleaning"
We implement a 3-step strategy to sanitize the HTML during the build process while keeping it flexible for development. ...