Skip to content

Commit d392e5e

Browse files
committed
fix: Configure function memory via adapter (#2687)
1 parent 8ad3e46 commit d392e5e

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

svelte.config.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ const config = {
99
preprocess: vitePreprocess(),
1010

1111
kit: {
12-
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
13-
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
14-
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
12+
// See:
13+
// https://svelte.dev/docs/kit/adapter-vercel
1514
adapter: adapter({
16-
// See: https://vercel.com/docs/edge-network/regions
15+
runtime: 'nodejs22.x',
1716
regions: ['hnd1'], // Tokyo, Japan.
17+
memory: 3008, // To avoid OOM errors on /workbooks/{slug}
18+
maxDuration: 30,
1819
}),
1920
// See:
2021
// https://kit.svelte.dev/docs/configuration#alias

vercel.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
{
22
"git": {
33
"deploymentEnabled": false
4-
},
5-
"functions": {
6-
".svelte-kit/**/*.js": {
7-
"memory": 3008,
8-
"maxDuration": 30
9-
}
10-
},
11-
"regions": ["hnd1"]
4+
}
125
}

0 commit comments

Comments
 (0)