diff --git a/package.json b/package.json index db1d619..a05f287 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "@playwright/test": "^1.23.2", "@rgossiaux/svelte-headlessui": "1.0.2", "@sveltejs/adapter-auto": "next", + "@sveltejs/adapter-vercel": "next", "@sveltejs/kit": "next", "@types/cookie": "^0.5.1", "@types/node": "^17.0.45", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cec02c1..8763efe 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,6 +6,7 @@ specifiers: '@playwright/test': ^1.23.2 '@rgossiaux/svelte-headlessui': 1.0.2 '@sveltejs/adapter-auto': next + '@sveltejs/adapter-vercel': next '@sveltejs/kit': next '@types/cookie': ^0.5.1 '@types/node': ^17.0.45 @@ -38,6 +39,7 @@ devDependencies: '@playwright/test': 1.23.2 '@rgossiaux/svelte-headlessui': 1.0.2_svelte@3.49.0 '@sveltejs/adapter-auto': 1.0.0-next.54 + '@sveltejs/adapter-vercel': 1.0.0-next.59 '@sveltejs/kit': 1.0.0-next.360_svelte@3.49.0+vite@2.9.13 '@types/cookie': 0.5.1 '@types/node': 17.0.45 diff --git a/svelte.config.js b/svelte.config.js index d6f36f5..7052181 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -1,4 +1,4 @@ -import adapter from '@sveltejs/adapter-auto'; +import vercel from '@sveltejs/adapter-vercel'; import preprocess from 'svelte-preprocess'; /** @type {import('@sveltejs/kit').Config} */ @@ -7,7 +7,20 @@ const config = { // for more information about preprocessors preprocess: preprocess(), kit: { - adapter: adapter(), + adapter: vercel({ + // if true, will deploy the app using edge functions + // (https://vercel.com/docs/concepts/functions/edge-functions) + // rather than serverless functions + edge: false, + + // an array of dependencies that esbuild should treat + // as external when bundling functions + external: [], + + // if true, will split your app into multiple functions + // instead of creating a single one for the entire app + split: false + }), alias: { $components: 'src/components', $root: './src'