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-auto
automatically chooses the proper adapter to use, but is less configurablenode
—@sveltejs/adapter-node
生成独立的 Node 服务器¥
node
—@sveltejs/adapter-node
generates a standalone Node serverstatic
—@sveltejs/adapter-static
允许你使用 SvelteKit 作为静态站点生成器 (SSG)¥
static
—@sveltejs/adapter-static
allows you to use SvelteKit as a static site generator (SSG)vercel
—@sveltejs/adapter-vercel
允许你部署到 Vercel¥
vercel
—@sveltejs/adapter-vercel
allows you to deploy to Vercelcloudflare
—@sveltejs/adapter-cloudflare
允许你部署到 Cloudflare¥
cloudflare
—@sveltejs/adapter-cloudflare
allows you to deploy to Cloudflarenetlify
—@sveltejs/adapter-netlify
允许你部署到 Netlify¥
netlify
—@sveltejs/adapter-netlify
allows you to deploy to Netlify
npx sv add --sveltekit-adapter=node