Add Cdn Bundle
Use this skill when shipping static frontend assets to a CDN.
When to Use
- You are deploying JS/CSS/image assets to a CDN.
- You need cache-safe rollout and quick rollback.
- You want to avoid stale assets and broken references.
Workflow
- Build production assets with content hashing enabled.
- Verify output manifest and entrypoints.
- Upload assets to versioned prefix/path.
- Apply cache headers:
- hashed assets: long-lived immutable cache
- HTML/manifest: short cache
- Validate SRI/integrity and MIME types.
- Perform canary or staged traffic rollout.
- Confirm monitoring for 404/5xx and asset error rates.
- Keep previous bundle path for rollback.
Common Pitfalls
- Non-hashed filenames causing stale client bundles
- Caching HTML too aggressively
- Missing invalidation for non-versioned paths
- Mismatch between asset manifest and deployed files
Output
- Deployment checklist and target paths
- Cache-control policy recommendation
- Rollout + rollback procedure
Scan to join WeChat group