Skip to content

Commit 49f63c7

Browse files
fix: add pnpm build approvals for sharp and workerd in Cloudflare deployment add-on
When using pnpm v11, creating a Cloudflare-deployed project fails because `wrangler` transitively depends on `sharp` and `workerd`, which have build scripts that are not listed in `pnpm.onlyBuiltDependencies`. Add these entries to both the React and Solid Cloudflare host `package.json.ejs` templates so they are merged with the base approvals at project creation time.
1 parent 12c31df commit 49f63c7

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

packages/create/src/frameworks/react/hosts/cloudflare/package.json.ejs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@
77
},
88
"devDependencies": {
99
"wrangler": "^4.70.0"
10+
},
11+
"pnpm": {
12+
"onlyBuiltDependencies": ["sharp", "workerd"]
1013
}
1114
}

packages/create/src/frameworks/solid/hosts/cloudflare/package.json.ejs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@
77
},
88
"devDependencies": {
99
"wrangler": "^4.70.0"
10+
},
11+
"pnpm": {
12+
"onlyBuiltDependencies": ["sharp", "workerd"]
1013
}
1114
}

0 commit comments

Comments
 (0)