sveltekit-adapter
SvelteKit 适配器 允许你将网站部署到众多平台。此插件允许你配置官方提供的 SvelteKit 适配器,但也提供多种 社区提供的适配器 适配器。
¥SvelteKit adapters allow you to deploy your site to numerous platforms. This add-on allows you to configure officially provided SvelteKit adapters, but a number of community-provided adapters are also available.
用法(Usage)
¥Usage
npx sv add sveltekit-adapter你将获得什么(What you get)
¥What you get
在你的
svelte.config.js中安装并配置所选的 SvelteKit 适配器¥the chosen SvelteKit adapter installed and configured in your
svelte.config.js
选项(Options)
¥Options
adapter
要使用哪种 SvelteKit 适配器:
¥Which SvelteKit adapter to use:
auto—@sveltejs/adapter-auto自动选择要使用的适配器,但配置性较差¥
auto—@sveltejs/adapter-autoautomatically chooses the proper adapter to use, but is less configurablenode—@sveltejs/adapter-node生成独立的 Node 服务器¥
node—@sveltejs/adapter-nodegenerates a standalone Node serverstatic—@sveltejs/adapter-static允许你使用 SvelteKit 作为静态站点生成器 (SSG)¥
static—@sveltejs/adapter-staticallows you to use SvelteKit as a static site generator (SSG)vercel—@sveltejs/adapter-vercel允许你部署到 Vercel¥
vercel—@sveltejs/adapter-vercelallows you to deploy to Vercelcloudflare—@sveltejs/adapter-cloudflare允许你部署到 Cloudflare¥
cloudflare—@sveltejs/adapter-cloudflareallows you to deploy to Cloudflarenetlify—@sveltejs/adapter-netlify允许你部署到 Netlify¥
netlify—@sveltejs/adapter-netlifyallows you to deploy to Netlify
npx sv add sveltekit-adapter=adapter:node