Skip to content

Commit ff4a088

Browse files
fix(cli): add @cloudflare/workers-types to devDependencies and update tsconfig for alchemy deployment
1 parent e9f43fa commit ff4a088

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

apps/cli/src/helpers/deployment/alchemy/alchemy-next-setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export async function setupNextAlchemyDeploy(
1313

1414
await addPackageDependency({
1515
dependencies: ["@opennextjs/cloudflare"],
16-
devDependencies: ["alchemy", "dotenv", "wrangler"],
16+
devDependencies: ["alchemy", "dotenv", "wrangler", "@cloudflare/workers-types"],
1717
projectDir: webAppDir,
1818
});
1919

apps/cli/templates/frontend/react/next/tsconfig.json.hbs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,22 @@
2121
],
2222
"paths": {
2323
"@/*": ["./src/*"]
24-
}
24+
}{{#if (or (eq serverDeploy "alchemy") (eq webDeploy "alchemy"))}},
25+
"types": [
26+
"@cloudflare/workers-types"
27+
]{{/if}}
2528
},
2629
"include": [
30+
{{#if (eq serverDeploy "alchemy")}}
31+
"../server/env.d.ts",
32+
{{/if}}
33+
{{#if (eq serverDeploy "wrangler")}}
34+
"../server/worker-configuration.d.ts",
35+
{{/if}}
2736
"./next-env.d.ts",
2837
"./**/*.ts",
2938
"./**/*.tsx",
30-
"./.next/types/**/*.ts",
31-
{{#if (eq runtime "workers")}}
32-
"../server/worker-configuration.d.ts"
33-
{{/if}}
39+
"./.next/types/**/*.ts"
3440
],
3541
"exclude": [
3642
"./node_modules"

0 commit comments

Comments
 (0)