SvelteKit adapter that automatically detects deployment environment and installs appropriate platform-specific adapter
Overall
score
96%
A smart build adapter router that detects the deployment environment and automatically delegates to the appropriate platform-specific build adapter.
The router should detect deployment environments by checking for platform-specific environment variables.
VERCEL environment variable is set, it should detect Vercel as the platform @testNETLIFY environment variable is set, it should detect Netlify as the platform @testCF_PAGES environment variable is set, it should detect Cloudflare Pages as the platform @testThe router should delegate build operations to the resolved platform-specific adapter by dynamically loading and calling the appropriate adapter module.
@sveltejs/adapter-vercel with the build configuration @test@sveltejs/adapter-netlify with the build configuration @test@generates
/**
* Creates an environment-based build adapter router that automatically
* detects the platform and delegates to the appropriate adapter
* @returns {Object} An adapter object with adapt() method
*/
export default function createAdapter() {
// Returns an adapter object
}Provides environment detection and adapter delegation functionality for SvelteKit builds.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-sveltejs--adapter-autodocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10