Cloudflare Worker Base Stack

•
21
•

Bootstraps production-ready Cloudflare Workers using Hono and Vite with integrated static asset hosting and API routing.

This skill provides a standardized, production-tested foundation for building Cloudflare Workers that combine high-performance API routes via Hono with modern static asset management through Vite. It eliminates common pitfalls such as routing conflicts between SPA fallbacks and API endpoints, HMR crashes during local development, and incorrect ES module export patterns. Designed for developers who need a robust serverless setup, it includes pre-configured settings for environment bindings (KV, D1, R2), TypeScript support, and automated type generation to ensure a smooth path from local development to global deployment.

主要功能

0121 GitHub stars
02Unified Hono and Vite integration for seamless API and frontend development
03Integrated support for Cloudflare Static Assets with SPA fallback capabilities
04Pre-configured run_worker_first routing to prevent API and static asset conflicts
05Optimized local development environment with fixed HMR and Miniflare support
06Standardized ES Module export patterns to avoid common build and runtime errors

使用场景

01Developing high-performance API services requiring edge-side static asset hosting
02Building full-stack serverless applications with a modern frontend and Hono backend
03Migrating legacy Service Worker scripts to modern ES Module Cloudflare Workers