fix(cli): add @cloudflare/workers-types to devDependencies and update tsconfig for alchemy deployment

This commit is contained in:
Aman Varshney
2025-09-10 23:22:58 +05:30
parent e9f43fa4c1
commit ff4a088407
2 changed files with 12 additions and 6 deletions

View File

@@ -13,7 +13,7 @@ export async function setupNextAlchemyDeploy(
await addPackageDependency({ await addPackageDependency({
dependencies: ["@opennextjs/cloudflare"], dependencies: ["@opennextjs/cloudflare"],
devDependencies: ["alchemy", "dotenv", "wrangler"], devDependencies: ["alchemy", "dotenv", "wrangler", "@cloudflare/workers-types"],
projectDir: webAppDir, projectDir: webAppDir,
}); });

View File

@@ -21,16 +21,22 @@
], ],
"paths": { "paths": {
"@/*": ["./src/*"] "@/*": ["./src/*"]
} }{{#if (or (eq serverDeploy "alchemy") (eq webDeploy "alchemy"))}},
"types": [
"@cloudflare/workers-types"
]{{/if}}
}, },
"include": [ "include": [
{{#if (eq serverDeploy "alchemy")}}
"../server/env.d.ts",
{{/if}}
{{#if (eq serverDeploy "wrangler")}}
"../server/worker-configuration.d.ts",
{{/if}}
"./next-env.d.ts", "./next-env.d.ts",
"./**/*.ts", "./**/*.ts",
"./**/*.tsx", "./**/*.tsx",
"./.next/types/**/*.ts", "./.next/types/**/*.ts"
{{#if (eq runtime "workers")}}
"../server/worker-configuration.d.ts"
{{/if}}
], ],
"exclude": [ "exclude": [
"./node_modules" "./node_modules"