@sveltejs/adapter-auto adapter automatically detects your production environment and selects the appropriate adapter for deployment.
Installation
Usage
Add the adapter to yoursvelte.config.js:
How it works
When you build your app,adapter-auto detects the environment by checking for specific environment variables and installs the appropriate adapter automatically:
1
Environment detection
Checks for platform-specific environment variables (e.g.,
VERCEL, CF_PAGES, NETLIFY)2
Adapter installation
Automatically installs the detected adapter if not already present
3
Build execution
Runs the selected adapter to generate platform-specific output
Supported environments
The adapter automatically detects and supports the following platforms:When to use adapter-auto
Good for: Quick starts, prototyping, and projects that deploy to a single, well-known platform.Not ideal for: Production apps where you want explicit control over deployment configuration or need to customize adapter options.
Replacing adapter-auto
For production deployments, consider replacingadapter-auto with a specific adapter:
Limitations
Certain features are not available withadapter-auto because it cannot determine environment capabilities: