Skip to content

Commit 46df88c

Browse files
authored
Add the nodejs_als flag for the svelte template (#9940)
Recent sveltekit versions rely on `node:async_hooks` to access `AsyncLocalStorage`
1 parent 8cf47f9 commit 46df88c

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

.changeset/bright-snails-knock.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"create-cloudflare": patch
3+
---
4+
5+
Enable the nodejs_als in the svelte template to work out of the box
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "<TBD>",
33
"compatibility_date": "<TBD>",
4+
"compatibility_flags": ["nodejs_als"],
45
"pages_build_output_dir": ".svelte-kit/cloudflare"
56
}

packages/create-cloudflare/templates/svelte/workers/templates/wrangler.jsonc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "<TBD>",
33
"main": ".svelte-kit/cloudflare/_worker.js",
44
"compatibility_date": "<TBD>",
5+
"compatibility_flags": ["nodejs_als"],
56
"assets": {
67
"binding": "ASSETS",
78
"directory": ".svelte-kit/cloudflare"

0 commit comments

Comments
 (0)