@yomnashousha/quick-deploy
v2.0.7
Published
One-command deployment for modern web frameworks to Cloudflare Workers & Pages
Maintainers
Readme
Quick Deploy
One-command deployment for modern web frameworks to Cloudflare Workers.
cd your-project
quick-deploy🚀 Supported Frameworks
| Framework | Status | Deployment Type | Notes | |-----------|--------|----------------|-------| | Next.js | ✅ Working | SSR | Uses OpenNext adapter, handles Turbopack issues | | Astro | ✅ Working | SSR/Static | Uses @astrojs/cloudflare adapter | | SvelteKit | ✅ Working | SSR | Uses @sveltejs/adapter-cloudflare | | React + Vite | ✅ Working | Static SPA | Uses @cloudflare/vite-plugin | | Nuxt | ✅ Working | SSR | Uses nitro-cloudflare-dev adapter | | Static HTML Sites | ✅ Working | Static | Pure HTML/CSS/JS sites, no framework required | | Angular | ❌ Not Working | - | Node.js compatibility issues with SSR | | React Router v7 | ❌ Not Working | - | Complex SSR setup incompatible with Workers | | Remix | ⚠️ Legacy Only | SSR | New project creations use React Router v7 |
📦 Installation
Quick Install (Recommended)
curl -fsSL https://raw.githubusercontent.com/username/quick-deploy/main/install.sh | bashNPM Install
npm install -g quick-deploy@latestFrom Source
git clone https://github.com/username/quick-deploy.git
cd quick-deploy
npm install
npm run build
npm link🎯 Usage
Basic Deployment
# Navigate to your project
cd my-nextjs-app
# Deploy with one command
quick-deployAvailable Commands
quick-deploy # Deploy current project
quick-deploy init # Initialize configuration
quick-deploy doctor # Run diagnostic checks
quick-deploy clean # Clean build artifacts
quick-deploy --help # Show all optionsCommand Options
quick-deploy [options]
Options:
-v, --verbose Enable verbose logging
-f, --force Force deployment even if checks fail
--skip-deps Skip dependency installation
--skip-env Skip environment variable checks
-o, --output-dir <dir> Specify custom output directory
-c, --config <file> Use custom configuration file
--help Show help
--version Show version🔧 Framework-Specific Setup
Next.js
# Create Next.js project
npx create-next-app@latest my-app --typescript --eslint --tailwind --src-dir --app --import-alias "@/*"
cd my-app
quick-deployFeatures:
- ✅ Automatic Turbopack detection and fix
- ✅ OpenNext adapter installation and configuration
- ✅ Proper wrangler.jsonc generation
- ✅ TypeScript support
Astro
# Create Astro project
npm create astro@latest my-astro-site -- --template minimal --typescript strict
cd my-astro-site
npm install
quick-deployFeatures:
- ✅ Interactive adapter installation via
astro add cloudflare - ✅ Automatic SSR/Static/Hybrid detection
- ✅ Proper asset handling with .assetsignore
SvelteKit
# Create SvelteKit project
npx sv create my-svelte-app
cd my-svelte-app
# Choose: SvelteKit minimal, TypeScript syntax, no additional features, npm
quick-deployFeatures:
- ✅ Cloudflare adapter installation and configuration
- ✅ TypeScript definitions update
- ✅ Automatic config file updates
React + Vite
# Create React + Vite project
npm create vite@latest my-react-app -- --template react-ts
cd my-react-app
npm install
quick-deployFeatures:
- ✅ Cloudflare Vite plugin installation
- ✅ Worker file generation with proper TypeScript types
- ✅ SPA routing configuration
Nuxt
# Create Nuxt project
npx nuxi@latest init my-nuxt-app
cd my-nuxt-app
npm install
quick-deployFeatures:
- ✅ Nitro Cloudflare adapter installation
- ✅ Automatic config updates for Cloudflare deployment
- ✅ TypeScript definitions for Cloudflare context
Static HTML Sites
# For any directory with HTML files
cd my-static-site
# Must have an index.html file
quick-deployFeatures:
- ✅ Automatic detection of static sites with index.html
- ✅ Worker script generation for file serving
- ✅ Automatic .assetsignore creation to exclude development files
- ✅ Clean URL support and SPA routing fallback
- ✅ Proper content-type headers for all file types
Remix (Legacy Projects Only)
# For existing Remix projects
cd my-existing-remix-app
quick-deployNote: Remix v2 is in maintenance mode. New projects should use React Router v7, though React Router v7 is not currently supported by quick-deploy due to complex SSR requirements.
❌ Unsupported Frameworks
Angular
Angular SSR has fundamental Node.js compatibility issues with Cloudflare Workers that prevent successful deployment. The Angular build process attempts to bundle Node.js-specific modules (fs, path, http, etc.) for browser use, which is incompatible with the Workers runtime.
React Router v7
React Router v7's SSR implementation requires complex server-side setup that doesn't align well with Cloudflare Workers' execution model. While the framework builds successfully, proper SSR hydration on Workers requires significant additional configuration.
🔍 How It Works
- Framework Detection: Analyzes your project to identify the framework
- Dependency Management: Installs required Cloudflare adapters
- Configuration: Creates/updates config files for Cloudflare deployment
- Build: Runs the appropriate build command for your framework
- Deploy: Uses Wrangler to deploy to Cloudflare Workers
🏗️ Architecture
src/
├── builders/ # Framework-specific build logic
│ ├── NextJSBuilder.ts
│ ├── AstroBuilder.ts
│ ├── ReactBuilder.ts
│ ├── SvelteBuilder.ts
│ ├── NuxtBuilder.ts
│ ├── StaticSiteBuilder.ts
│ ├── AngularBuilder.ts (not functional)
│ ├── ReactRouterBuilder.ts (not functional)
│ └── BaseBuilder.ts
├── deployers/ # Deployment handlers
│ ├── CloudflareDeployer.ts
│ └── BaseDeployer.ts
├── core/ # Core functionality
│ ├── QuickDeploy.ts
│ ├── FrameworkDetector.ts
│ └── EnvironmentChecker.ts (not currently used)
└── utils/ # Utilities
├── Logger.ts
├── Process.ts
└── FileSystem.tsNote: The EnvironmentChecker.ts module is implemented but not currently integrated into the deployment flow. It provides environment variable detection and build-safe placeholder generation for projects that require environment variables during build time.
⚙️ Configuration
Quick Deploy works out of the box, but you can customize behavior:
Environment Variables
# Optional: For package resolution issues
WRANGLER_BUILD_CONDITIONS=""
WRANGLER_BUILD_PLATFORM="node"Custom Configuration
# Create custom config
quick-deploy init
# Use custom config file
quick-deploy -c my-config.json🐛 Troubleshooting
Common Issues
Next.js Turbopack Error
Error: handler32 is not a functionSolution: Quick Deploy automatically detects and fixes Turbopack issues by updating your build script.
Package Resolution Errors
Could not resolve package XSolution: Try setting environment variables to fix package resolution:
WRANGLER_BUILD_CONDITIONS=""
WRANGLER_BUILD_PLATFORM="node"TypeScript Errors in Worker Files
Cannot find name 'Request'Solution: Quick Deploy automatically installs @cloudflare/workers-types and configures proper TypeScript support.
Debug Mode
quick-deploy --verboseClean Build Artifacts
quick-deploy cleanCheck Project Compatibility
quick-deploy doctor📊 Framework Support Matrix
| Feature | Next.js | Astro | SvelteKit | React+Vite | Nuxt | Static Sites | Angular | React Router | |---------|---------|-------|-----------|------------|------|-------------|---------|-------------| | SSR | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | | Static Sites | ❌ | ✅ | ❌ | ✅ | ❌ | ✅ | N/A | N/A | | API Routes | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | N/A | N/A | | TypeScript | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | N/A | N/A | | Auto Config | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ |
🚀 Development
Development Setup
git clone https://github.com/username/quick-deploy.git
cd quick-deploy
npm install
npm run build
npm link
# Test your changes
cd test-project
quick-deployTesting Framework Support
# Test each supported framework
npm create astro@latest test-astro
npx create-next-app@latest test-nextjs
npx nuxi@latest init test-nuxt
npx sv create test-svelte
npm create vite@latest test-react -- --template react-ts
# Test static site (any directory with index.html)
mkdir test-static && cd test-static
echo '<html><body><h1>Hello World</h1></body></html>' > index.html
# Deploy each
cd test-astro && quick-deploy
cd ../test-nextjs && quick-deploy
cd ../test-nuxt && quick-deploy
cd ../test-svelte && quick-deploy
cd ../test-react && quick-deploy
cd ../test-static && quick-deployQuick Deploy - Deploy modern web frameworks to Cloudflare Workers with zero configuration.
