Sveltekit
Section titled “Sveltekit”Deploy your SvelteKit applications with zero configuration and enterprise-grade performance. Our platform is specifically optimized for SvelteKit’s architecture, delivering faster builds and better runtime performance than traditional hosting solutions.
Why sherpa.software is Perfect for SvelteKit
Section titled “Why sherpa.software is Perfect for SvelteKit”Zero Edge Request Charges
Section titled “Zero Edge Request Charges”Unlike other platforms that charge per edge request, we never bill for edge traffic. This matters for SvelteKit because of its intelligent code-splitting strategy:
SvelteKit automatically creates many small chunks
// app.js (5kb) - Core application logic// chunk-abc123.js (2kb) - Home page component// chunk-def456.js (3kb) - About page component// chunk-ghi789.js (1kb) - Shared utilities
Why This Saves You Money:
- SvelteKit creates 20-50+ small JavaScript chunks per application (or more!)
- Each chunk loads on-demand, triggering separate edge requests
- Other platforms charge $0.01-0.10 per 10,000 edge requests
- With sherpa.software: $0.00 for unlimited edge requests
Real-World Impact:
SvelteKit App Monthly Traffic Overview
Static Assets: Approximately 2 million requests for JS chunks, CSS, and images
SSR Pages: Approximately 500,000 requests
API Calls: Approximately 1 million requests
Cost Comparison
Other Platforms: $150-300/month in edge fees
Sherpa.sh: $0
Optimized Node.js Adapter Performance
Section titled “Optimized Node.js Adapter Performance”We’ve fine-tuned our infrastructure specifically for @sveltejs/adapter-node
to deliver optimal SSR performance:
SSR Performance Optimizations
- Cold Start Elimination: Pre-warmed Node.js instances across regions
- Memory Optimization: 512MB-2GB+ containers with intelligent horizontal scaling
- Request Routing: Smart load balancing based on geographic proximity
Performance Benchmarks:
# SSR response times (95th percentile)
sherpa.software: 89ms average globally
Traditional VPS: 340ms average
Other serverless: 180ms average (with cold starts)
Ready to deploy? Create a free account →
Quick Start Guide
Section titled “Quick Start Guide”Get your SvelteKit app live in under 2 minutes with our streamlined deployment process.
Prerequisites
Section titled “Prerequisites”- SvelteKit 2.x project
- Git repository (GitHub, GitLab, or Bitbucket)
- Node.js 18+ locally for development
Deployment Steps
Section titled “Deployment Steps”- Connect Repository: Link your Git repository to sherpa.software
- Auto-Detection: We automatically detect your SvelteKit configuration
- Deploy: Push to your main branch triggers automatic deployment
- Live: Your app is available at
https://your-app.sherpa.software
What You Get Instantly
Section titled “What You Get Instantly”- Zero Configuration: Works with your existing
svelte.config.js
- Global CDN: Static assets served from 200+ edge locations
- Automatic HTTPS: SSL certificates provisioned and renewed automatically
- Performance Optimization: Built-in code splitting and asset preloading
- Pay-per-Use: No idle costs - only pay for actual usage
Configuration
Section titled “Configuration”Server-Side Rendering Configuration
Section titled “Server-Side Rendering Configuration”For server-side rendering, you must use the @sveltejs/adapter-node
adapter with trustProxy: true
:
# Install the Node adapternpm install @sveltejs/adapter-node
import adapter from '@sveltejs/adapter-node';
export default { kit: { adapter: adapter({ out: 'build', trustProxy: true // Required for proper load balancer header handling }) }};
Static Site Generation Configuration
Section titled “Static Site Generation Configuration”For static site generation, use the @sveltejs/adapter-static
adapter:
# Install the Static adapternpm install @sveltejs/adapter-static
import adapter from '@sveltejs/adapter-static';
export default { kit: { adapter: adapter({ pages: 'build', assets: 'build', fallback: undefined, precompress: false }) }};
Environment Variables Set Automatically
PORT=3000 # Standard runtime port (SSR only)ORIGIN=https://your-domain.com # Your custom domainNODE_ENV=production # Production optimizationsPROTOCOL_HEADER=x-forwarded-proto # HTTPS detectionHOST_HEADER=x-forwarded-host # Proper host handling
Performance Enhancements
Section titled “Performance Enhancements”Code Splitting Optimization
SvelteKit’s automatic code splitting works perfectly with our HTTP/2 infrastructure:
Parallel Chunk Loading in Routes
Your route-based chunks load in parallel, requiring no additional configuration—this functionality works automatically.
Static Asset Acceleration
- File Hashing: Long-term caching for unchanged files
- Compression: Automatic Brotli and Gzip compression
- Edge Caching: Assets cached globally for <50ms load times
Prerendering Support
To enable prerendering in your routes, use the following snippet:
// In routes that can be prerendered:export const prerender = true;// These routes are built as static HTML and
Advanced Features
Section titled “Advanced Features”Image Optimization
Section titled “Image Optimization”Automatic image optimization with SvelteKit’s enhanced:img component:
svelte<!-- Original image --><img src="/hero.jpg" alt="Hero image" /><!-- Automatically optimized, cached, and served from CDN -->
Optimization Features:
- WebP/AVIF conversion for modern browsers
- Responsive sizing based on device
- Lazy loading below the fold
- Global CDN delivery
Caching Strategy
Section titled “Caching Strategy”Intelligent Cache Headers
We will use whatever cache-headers you set in Sveltekit setup, otherwise default to these.
Cache-Control: public, max-age=31536000, immutable # Static assets (JS, CSS, images)Cache-Control: public, max-age=3600 # Prerendered pagesCache-Control: no-cache # API routes
Cache Debugging
Check cache performance in browser DevTools:
# Response headers show cache statusCdn-Cache: HIT # Served from edge cacheCdn-Cache: MISS # Fetched from origin
Load Balancing & Scaling
Section titled “Load Balancing & Scaling”Server-Side Rendering (SSR)
- Auto-scaling Node.js instances
- Geographic distribution for reduced latency
- Zero-downtime deployments
Developer Experience
Section titled “Developer Experience”Local Development Compatibility
Section titled “Local Development Compatibility”Your local development workflow remains unchanged:
# Development (unchanged)npm run dev
# Build locally (unchanged)npm run build
# Deploy to sherpa.softwaregit push origin main # Triggers automatic deployment
Build Process Insights
Section titled “Build Process Insights”Monitor your builds in real-time:
- Build Time: Typical SvelteKit builds complete in 30-60 seconds
- Bundle Analysis: See which routes contribute to bundle size
Debugging & Monitoring
Section titled “Debugging & Monitoring”Real-Time Logs
View live application logs from inside the portal. You get logging for:
- CDN requests
- Live Node Console
Configuration Examples
Section titled “Configuration Examples”Custom Headers
Section titled “Custom Headers”Add custom headers for specific routes in your SvelteKit configuration:
// In your svelte.config.jsimport adapter from '@sveltejs/adapter-node';
export default { kit: { adapter: adapter({ out: 'build', trustProxy: true }), // Add custom headers for specific routes headers: { '/**': { 'X-Frame-Options': 'DENY', 'X-Content-Type-Options': 'nosniff' } } }};
Environment-Specific Configuration
Section titled “Environment-Specific Configuration”// Different configs per environmentimport adapter from '@sveltejs/adapter-node';
const config = { kit: { adapter: adapter({ out: 'build', trustProxy: true }), paths: { base: process.env.NODE_ENV === 'production' ? '/app' : '' } }};
export default config;
Enterprise Features
Section titled “Enterprise Features”Advanced Security
Section titled “Advanced Security”- SOC 2 Compliance: Enterprise-grade security controls
- Custom WAF Rules: Protect against application-specific threats
- DDoS Protection: Automatic traffic filtering and rate limiting
Performance & Reliability
Section titled “Performance & Reliability”- 100% Uptime SLA: Guaranteed uptime with financial backing
- Custom Edge Logic: Run code at 200+ global locations
- Dedicated Infrastructure: Isolated compute for enterprise workloads
Developer Support
Section titled “Developer Support”- Dedicated Account Manager: Direct line to platform experts
- Priority Support: <2 hour response time for critical issues
- Custom Integrations: Connect with your existing DevOps tools
Troubleshooting
Section titled “Troubleshooting”Getting Help
Section titled “Getting Help”- Documentation: Comprehensive guides here
- Community Support & Tickets: Join our Discord
Migration Guide
Section titled “Migration Guide”From Other Platforms
Section titled “From Other Platforms”The easiest way to migration from another platform is to follow the quickstart guide.
From Self-Hosted
Section titled “From Self-Hosted”Key differences when migrating from self-hosted SvelteKit:
- Adapter Requirement: Use
@sveltejs/adapter-node
withtrustProxy: true
for SSR, or@sveltejs/adapter-static
for static sites - Remove PM2 or Docker configurations
- Environment variables managed in dashboard
- No need for reverse proxy setup
- Automatic SSL certificate management
Next Steps
Section titled “Next Steps”After deploying your first SvelteKit app:
- Custom Domain: Connect your domain in the dashboard
- Environment Variables: Configure secrets and API keys
- Team Access: Invite collaborators with role-based permissions
- Monitoring: Set up alerts for performance and errors
- API Integration: Connect to databases and external services
Ready to deploy? Create a free account →