2.6 KiB
2.6 KiB
Vercel → Cloudflare Pages Migration Checklist
✅ Completed Setup
- Created
_redirectsfile for SPA routing (insrc/public/) - Updated
package.jsonto remove Vercel from deploy script - Created migration guide (
CLOUDFLARE_PAGES_MIGRATION.md) - Updated deployment documentation
📋 Action Items
1. Create Cloudflare Pages Project
- Go to Cloudflare Dashboard
- Navigate to Pages → Create a project
- Connect GitHub repository:
Jeff-Emmett/canvas-website - Configure:
- Project name:
canvas-website - Production branch:
main - Build command:
npm run build - Build output directory:
dist - Root directory:
/(leave empty)
- Project name:
2. Set Environment Variables
- Go to Pages project → Settings → Environment variables
- Add all
VITE_*variables from Vercel:VITE_WORKER_ENV=production(for production)VITE_WORKER_ENV=dev(for preview)- Any other
VITE_*variables you use
- Set different values for Production and Preview if needed
3. Test First Deployment
- Wait for first deployment to complete
- Visit Pages URL (e.g.,
canvas-website.pages.dev) - Test routes:
/board/inbox/contact/presentations/dashboard
- Verify canvas app connects to Worker
- Test real-time collaboration
4. Configure Custom Domain (if applicable)
- Go to Pages project → Custom domains
- Add your domain (e.g.,
jeffemmett.com) - Update DNS records to point to Cloudflare Pages
- Wait for DNS propagation
5. Clean Up Vercel (after confirming Cloudflare works)
- Verify everything works on Cloudflare Pages
- Go to Vercel Dashboard
- Disconnect repository or delete project
- Update DNS records if using custom domain
🔍 Verification Steps
After migration, verify:
- ✅ All routes work (no 404s)
- ✅ Canvas app loads and connects to Worker
- ✅ Real-time collaboration works
- ✅ Environment variables are accessible
- ✅ Assets load correctly
- ✅ No console errors
📝 Notes
- The
_redirectsfile is insrc/public/and will be copied todist/during build - Worker deployment is separate and unchanged
- Environment variables must start with
VITE_to be accessible in the browser - Cloudflare Pages automatically deploys on push to
mainbranch
🆘 If Something Goes Wrong
- Check Cloudflare Pages build logs
- Check browser console for errors
- Verify environment variables are set
- Verify Worker is accessible
- Check
_redirectsfile is indist/after build