Skip to content

Commit

Permalink
Use vercel edge functions (#133)
Browse files Browse the repository at this point in the history
* Use vercel edge functions

* Use vercel adapter and set runtime there

* Update lots of packages to support adapter-vercel

* Clean up whitespace changes
  • Loading branch information
iterion authored Apr 4, 2024
1 parent d29fa37 commit 8360c91
Show file tree
Hide file tree
Showing 3 changed files with 739 additions and 204 deletions.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
},
"devDependencies": {
"@playwright/test": "^1.28.1",
"@sveltejs/adapter-auto": "^2.0.0",
"@sveltejs/kit": "^1.30.3",
"@sveltejs/adapter-vercel": "^5.2.0",
"@sveltejs/kit": "^2.4.0",
"@sveltejs/vite-plugin-svelte": "^3.0.2",
"@testing-library/jest-dom": "^6.2.0",
"@testing-library/svelte": "^4.0.5",
"@types/object.groupby": "^1.0.3",
Expand All @@ -41,7 +42,7 @@
"tailwindcss": "^3.3.3",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^4.5.2",
"vite": "^5.0.3",
"vite-plugin-mkcert": "^1.16.0",
"vitest": "1.1.3",
"vitest-dom": "^0.1.1"
Expand Down
8 changes: 5 additions & 3 deletions svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import adapter from '@sveltejs/adapter-auto'
import { vitePreprocess } from '@sveltejs/kit/vite'
import adapter from '@sveltejs/adapter-vercel'
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'

/** @type {import('@sveltejs/kit').Config} */
const config = {
Expand All @@ -11,7 +11,9 @@ const config = {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: adapter(),
adapter: adapter({
runtime: 'edge'
}),
alias: {
styles: 'src/styles',
components: 'src/components'
Expand Down
Loading

0 comments on commit 8360c91

Please sign in to comment.